@@ -16,59 +16,56 @@ jobs:
1616 runs-on : ubuntu-latest
1717 strategy :
1818 matrix :
19- python-version :
20- - ' 3.9'
21- - ' 3.10'
22- - ' 3.11'
23- - ' 3.12'
24- - ' 3.13'
19+ python-version : ['3.11', '3.12', '3.13']
2520
2621 steps :
27- - uses : actions/checkout@v4
28- - name : Set up Python ${{ matrix.python-version }}
29- uses : actions/setup-python@v5
22+ - uses : actions/checkout@v5
23+
24+ - name : Install uv
25+ uses : astral-sh/setup-uv@v7
3026 with :
27+ version : " 0.9.*"
28+ enable-cache : true
3129 python-version : ${{ matrix.python-version }}
3230
3331 - name : Install dependencies
3432 run : |
35- python -m pip install --upgrade pip
36- python -m pip install .["test"]
37-
38- - name : Run tests
39- run : python -m pytest --cov tilebench --cov-report xml --cov-report term-missing
33+ uv sync
4034
41- - name : run pre-commit
35+ - name : Run pre-commit
4236 if : ${{ matrix.python-version == env.LATEST_PY_VERSION }}
4337 run : |
44- python -m pip install pre-commit
45- pre-commit run --all-files
38+ uv run pre-commit run --all-files
39+
40+ - name : Run tests
41+ run : uv run pytest --cov tilebench --cov-report xml --cov-report term-missing
4642
4743 - name : Upload Results
4844 if : ${{ matrix.python-version == env.LATEST_PY_VERSION }}
49- uses : codecov/codecov-action@v1
45+ uses : codecov/codecov-action@v5
5046 with :
51- file : ./coverage.xml
47+ files : ./coverage.xml
5248 flags : unittests
53- name : ${{ matrix.python-version }}
5449 fail_ci_if_error : false
50+ token : ${{ secrets.CODECOV_TOKEN }}
5551
5652 publish :
5753 needs : [tests]
5854 runs-on : ubuntu-latest
5955 if : startsWith(github.event.ref, 'refs/tags') || github.event_name == 'release'
6056 steps :
61- - uses : actions/checkout@v4
62- - name : Set up Python ${{ env.LATEST_PY_VERSION }}
63- uses : actions/setup-python@v5
57+ - uses : actions/checkout@v5
58+
59+ - name : Install uv
60+ uses : astral-sh/setup-uv@v7
6461 with :
62+ version : " 0.9.*"
63+ enable-cache : true
6564 python-version : ${{ env.LATEST_PY_VERSION }}
6665
6766 - name : Install dependencies
6867 run : |
69- python -m pip install --upgrade pip
70- python -m pip install hatch
71- python -m hatch build
68+ uv sync --group deploy
7269
7370 - name : Set tag version
7471 id : tag
@@ -78,28 +75,29 @@ jobs:
7875 - name : Set module version
7976 id : module
8077 run : |
81- echo "version=$(hatch --quiet version)" >> $GITHUB_OUTPUT
78+ echo "version=$(uv run hatch --quiet version)" >> $GITHUB_OUTPUT
8279
8380 - name : Show version
8481 run : |
8582 echo "${{ steps.tag.outputs.version }}"
8683 echo "${{ steps.module.outputs.version }}"
8784
88- - name : publish
85+ - name : Build and publish
8986 if : ${{ steps.tag.outputs.version }} == ${{ steps.module.outputs.version}}
9087 env :
9188 HATCH_INDEX_USER : ${{ secrets.PYPI_USERNAME }}
9289 HATCH_INDEX_AUTH : ${{ secrets.PYPI_PASSWORD }}
9390 run : |
94- python -m hatch publish
91+ uv run hatch build
92+ uv run hatch publish
9593
9694 publish-docker :
9795 needs : [tests]
9896 if : github.ref == 'refs/heads/main' || startsWith(github.event.ref, 'refs/tags') || github.event_name == 'release'
9997 runs-on : ubuntu-latest
10098 steps :
10199 - name : Checkout
102- uses : actions/checkout@v4
100+ uses : actions/checkout@v5
103101
104102 - name : Set up QEMU
105103 uses : docker/setup-qemu-action@v1
0 commit comments