Skip to content

Commit d0b87d6

Browse files
committed
ci: fix test job to use uv and run coverage upload once on Python 3.13 only
1 parent 49d4091 commit d0b87d6

1 file changed

Lines changed: 12 additions & 9 deletions

File tree

.github/workflows/ci.yml

Lines changed: 12 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -28,33 +28,36 @@ jobs:
2828

2929
test:
3030
runs-on: ubuntu-latest
31+
strategy:
32+
matrix:
33+
python-version: ['3.9', '3.10', '3.11', '3.12', '3.13']
3134
steps:
3235
- name: Checkout code
3336
uses: actions/checkout@v3
3437

35-
- name: Set up Python
36-
uses: actions/setup-python@v5
37-
with:
38-
python-version: '3.9'
38+
- name: Install uv
39+
uses: astral-sh/setup-uv@v5
40+
41+
- name: Set up Python ${{ matrix.python-version }}
42+
run: uv python install ${{ matrix.python-version }}
3943

4044
- name: Copy .env-EXAMPLE to .env
4145
run: cp .env-EXAMPLE .env
4246

4347
- name: Install dependencies
44-
run: |
45-
python -m pip install --upgrade pip
46-
pip install -r requirements_test.txt
48+
run: uv sync --group test
4749

4850
- name: Run tests
4951
run: |
50-
pytest --cov=src --cov-report=xml --maxfail=1 --disable-warnings -q
52+
uv run pytest --cov=src --cov-report=xml --maxfail=1 --disable-warnings -q
5153
5254
- name: Upload coverage report
55+
if: matrix.python-version == '3.13'
5356
uses: codecov/codecov-action@v5
5457
with:
5558
files: coverage.xml
5659
flags: unittests
5760
name: codecov-umbrella
58-
fail_ci_if_error: true
61+
fail_ci_if_error: false
5962
verbose: true
6063
token: ${{ secrets.CODECOV_TOKEN }}

0 commit comments

Comments
 (0)