Skip to content

Commit b1d339e

Browse files
committed
ci: add github workflows for unit tests with different versions of python
1 parent b18ac2c commit b1d339e

File tree

1 file changed

+15
-16
lines changed

1 file changed

+15
-16
lines changed

.github/workflows/tests.yml

Lines changed: 15 additions & 16 deletions
Original file line numberDiff line numberDiff line change
@@ -7,29 +7,28 @@ on:
77
pull_request:
88
branches:
99
- main
10-
10+
1111
jobs:
1212
test:
1313
runs-on: ubuntu-latest
14+
strategy:
15+
matrix:
16+
python-version:
17+
- "3.8"
18+
- "3.9"
19+
- "3.10"
1420

1521
steps:
16-
- uses: actions/checkout@v3
17-
18-
- name: Set up Python
19-
uses: actions/setup-python@v3
20-
with:
21-
python-version: '3.8'
22+
- uses: actions/checkout@v4
2223

2324
- name: Install uv
24-
run: curl -LsSf https://astral.sh/uv/install.sh | sh
25+
uses: astral-sh/setup-uv@v5
26+
with:
27+
python-version: ${{ matrix.python-version }}
2528

26-
- name: Install dependencies
27-
run: |
28-
source $HOME/.cargo/env
29-
uv sync --group=dev
29+
- name: Install the project
30+
run: uv sync --reinstall --locked --all-extras --dev
3031

31-
- name: Run tests
32-
run: |
33-
source $HOME/.cargo/env
34-
uv run pytest
32+
- name: Run unit tests
33+
run: uv run pytest
3534

0 commit comments

Comments
 (0)