@@ -2,71 +2,76 @@ name: CI
22
33on :
44 pull_request :
5- branches : [main]
5+ branches : [ main ]
66 push :
7- branches : [main]
7+ branches : [ main ]
88
99jobs :
1010 build :
1111 name : Build
1212 runs-on : ubuntu-24.04
13+ env :
14+ PYTHON_VERSION : 3.9
15+ UV_VERSION : 0.7.9
1316
1417 steps :
1518 - name : Checkout repository
1619 uses : actions/checkout@v4
1720
18- - name : Setup Python
19- uses : actions /setup-python @v5
21+ - name : Install uv
22+ uses : astral-sh /setup-uv @v5
2023 with :
21- python-version : " 3.11"
24+ enable-cache : true
25+ version : ${{ env.UV_VERSION }}
2226
23- - name : Install Poetry
24- uses : snok/install-poetry@v1
27+ - name : " Set up Python"
28+ uses : actions/setup-python@v5
29+ with :
30+ python-version : ${{ env.PYTHON_VERSION }}
2531
2632 - name : Install dependencies
27- run : poetry install
33+ run : uv sync --locked --all-extras --dev
2834
2935 - name : Lint
30- run : poetry run black --check .
36+ run : uv run black --check .
3137
3238 - name : Build
33- run : poetry build
39+ run : uv build
3440
35- # the `coverage xml -i` command is needed to re-write the
36- # coverage report with relative paths
3741 - name : Test
38- run : |
39- poetry run pytest --cov src --cov-report xml tests
40- poetry run coverage xml -i
42+ run : uv run pytest
4143
4244 test :
4345 name : Test
4446 runs-on : ubuntu-24.04
4547 strategy :
4648 fail-fast : false
4749 matrix :
48- python-version : ["3.8", "3.9", "3.10", "3.11", "3.12"]
49- poetry-version : ["1.8.2"]
50+ python-version : [ "3.8", "3.9", "3.10", "3.11", "3.12", "3.13" ]
51+ env :
52+ UV_PYTHON : ${{ matrix.python-version }}
5053
5154 steps :
5255 - name : Checkout repository
5356 uses : actions/checkout@v4
5457
58+ - name : Install uv
59+ uses : astral-sh/setup-uv@v5
60+ with :
61+ enable-cache : true
62+ version : ${{ env.UV_VERSION }}
63+
5564 - name : Setup python
5665 uses : actions/setup-python@v5
5766 with :
5867 python-version : " ${{ matrix.python-version }}"
5968
60- - name : Install Poetry
61- uses : snok/install-poetry@v1
62- with :
63- version : " ${{ matrix.poetry-version }}"
6469
6570 - name : Install dependencies
66- run : poetry install
71+ run : uv sync --locked --all-extras --dev
6772
6873 - name : Build
69- run : poetry build
74+ run : uv build
7075
7176 - name : Test
72- run : poetry run tox
77+ run : uv run pytest
0 commit comments