@@ -3,43 +3,56 @@ name: CI
33on : [push]
44
55jobs :
6- lint :
7-
6+ static-checks :
87 runs-on : ubuntu-latest
9- name : lint
8+ strategy : &python-matrix
9+ matrix :
10+ python-version :
11+ - " 3.11"
12+ - " 3.12"
13+ - " 3.13"
14+ name : static-checks
1015 steps :
11- - uses : actions/checkout@v4
12- - name : Set up Python 3.10
16+ - name : Checkout code
17+ uses : actions/checkout@v4
18+
19+ - name : Set up Python
1320 uses : actions/setup-python@v5
1421 with :
15- python-version : ' 3.10'
16- - name : Install poetry
17- run : pip install poetry
22+ python-version : ${{ matrix.python-version }}
23+
24+ - name : Install uv
25+ uses : astral-sh/setup-uv@v6
26+ with :
27+ python-version : ${{ matrix.python-version }}
28+ enable-cache : true
29+
1830 - name : Install project dependencies
19- run : poetry install --no-ansi --with=dev
31+ run : uv sync --locked --all-extras --dev --all-packages
32+
33+ - name : Format
34+ run : uv run format_check
35+
2036 - name : Lint
21- run : poetry run lint
22- - name : Check format
23- run : poetry run format_check
24- - name : Type checker
25- run : poetry run pyright
26-
37+ run : uv run lint
38+
39+ - name : Type check
40+ run : uv run pyright
41+
2742 test :
28- runs-on : ubuntu-latest
29- strategy :
30- matrix :
31- python-version : ["3.10", "3.11", "3.12"]
32- env :
33- PYTHON_VERSION : ${{ matrix.python-version }}
34- name : test
35- steps :
36- - uses : actions/checkout@v4
37-
38- - name : Log in to GitHub Container Registry
39- run : echo "${{ secrets.PACKAGE_ACCESS_TOKEN }}" | docker login ghcr.io -u USERNAME --password-stdin
40-
41- - name : Run tests
42- run : docker compose -f docker-compose-test.yaml up test --exit-code-from test
43-
44- - name : Tear down test containers
45- run : docker compose -f docker-compose-test.yaml down
43+ runs-on : ubuntu-latest
44+ strategy : *python-matrix
45+ env :
46+ PYTHON_VERSION : ${{ matrix.python-version }}
47+ name : test
48+ steps :
49+ - uses : actions/checkout@v4
50+
51+ - name : Log in to GitHub Container Registry
52+ run : echo "${{ secrets.PACKAGE_ACCESS_TOKEN }}" | docker login ghcr.io -u USERNAME --password-stdin
53+
54+ - name : Run tests
55+ run : docker compose -f docker-compose-test.yaml up test --exit-code-from test
56+
57+ - name : Tear down test containers
58+ run : docker compose -f docker-compose-test.yaml down
0 commit comments