Skip to content
Draft
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
40 changes: 31 additions & 9 deletions .github/workflows/unittest.yml
Original file line number Diff line number Diff line change
Expand Up @@ -30,12 +30,18 @@ jobs:
uses: actions/setup-python@v5
with:
python-version: ${{ matrix.python }}
- name: Setup uv
uses: astral-sh/setup-uv@v5
with:
enable-cache: true
- name: Install nox
run: |
python -m pip install --upgrade setuptools pip wheel
python -m pip install nox
uv pip install --system "nox[uv]"
- name: Run unit tests
env:
NOX_DEFAULT_VENV_BACKEND: uv
UV_VENV_SEED: 1
UV_COMPILE_BYTECODE: 1
COVERAGE_FILE: .coverage-${{ matrix.python }}
BUILD_TYPE: presubmit
TARGET_BRANCH: ${{ github.base_ref || github.event.merge_group.base_ref }}
Expand Down Expand Up @@ -68,12 +74,18 @@ jobs:
with:
python-version: ${{ matrix.python }}
allow-prereleases: true
- name: Setup uv
uses: astral-sh/setup-uv@v5
with:
enable-cache: true
- name: Install nox
run: |
python -m pip install --upgrade setuptools pip wheel
python -m pip install nox
uv pip install --system "nox[uv]"
- name: Run ${{ matrix.option }} tests
env:
NOX_DEFAULT_VENV_BACKEND: uv
UV_VENV_SEED: 1
UV_COMPILE_BYTECODE: 1
BUILD_TYPE: presubmit
TARGET_BRANCH: ${{ github.base_ref || github.event.merge_group.base_ref }}
TEST_TYPE: ${{ matrix.option }}
Expand All @@ -100,12 +112,18 @@ jobs:
uses: actions/setup-python@v5
with:
python-version: ${{ matrix.python }}
- name: Setup uv
uses: astral-sh/setup-uv@v5
with:
enable-cache: true
- name: Install nox
run: |
python -m pip install --upgrade setuptools pip wheel
python -m pip install nox
uv pip install --system "nox[uv]"
- name: Run ${{ matrix.option }} tests
env:
NOX_DEFAULT_VENV_BACKEND: uv
UV_VENV_SEED: 1
UV_COMPILE_BYTECODE: 1
BUILD_TYPE: presubmit
TARGET_BRANCH: ${{ github.base_ref || github.event.merge_group.base_ref }}
TEST_TYPE: ${{ matrix.option }}
Expand Down Expand Up @@ -133,11 +151,15 @@ jobs:
- name: Set number of files changes in packages directory
id: packages
run: echo "::set-output name=num_files_changed::$(git diff HEAD~1 -- packages | wc -l)"
- name: Setup uv
if: steps.packages.outputs.num_files_changed > 0 || steps.packages.num_files_changed > 0
uses: astral-sh/setup-uv@v5
with:
enable-cache: true
- name: Install coverage
if: steps.packages.num_files_changed > 0
if: steps.packages.outputs.num_files_changed > 0 || steps.packages.num_files_changed > 0
run: |
python -m pip install --upgrade setuptools pip wheel
python -m pip install coverage
uv pip install --system coverage
- name: Download coverage results
if: ${{ steps.date.packages.num_files_changed > 0 }}
uses: actions/download-artifact@v4
Expand Down
Loading