1919 # Run tests on pull requests.
2020 pull_request :
2121env :
22- LATEST_PY_VERSION : ' 3.12 '
22+ LATEST_PY_VERSION : ' 3.13 '
2323
2424
2525jobs :
2626 tests :
2727 runs-on : ubuntu-latest
2828 strategy :
2929 matrix :
30- python-version : ['3.8 ', '3.9 ', '3.10', '3.11', '3.12 ']
30+ python-version : ['3.11 ', '3.12 ', '3.13 ']
3131
3232 steps :
33- - uses : actions/checkout@v4
34- - name : Set up Python ${{ matrix.python-version }}
35- uses : actions/setup-python@v5
33+ - uses : actions/checkout@v5
34+
35+ - name : Install uv
36+ uses : astral-sh/setup-uv@v7
3637 with :
38+ version : " 0.9.*"
39+ enable-cache : true
3740 python-version : ${{ matrix.python-version }}
3841
3942 - name : Install dependencies
4043 run : |
41- python -m pip install --upgrade pip
42- python -m pip install -e .["test"]
44+ uv sync
4345
4446 - name : run pre-commit
4547 if : ${{ matrix.python-version == env.LATEST_PY_VERSION }}
4648 run : |
47- python -m pip install pre-commit
48- pre-commit run --all-files
49+ uv run pre-commit run --all-files
4950
5051 - name : Run tests
51- run : python -m pytest --cov titiler.stacapi --cov-report term-missing -s -vv
52+ run : uv run pytest --cov titiler.stacapi --cov-report term-missing -s -vv
5253
5354 - name : Upload Results
5455 if : ${{ matrix.python-version == env.LATEST_PY_VERSION }}
@@ -64,17 +65,17 @@ jobs:
6465 runs-on : ubuntu-latest
6566 if : startsWith(github.event.ref, 'refs/tags') || github.event_name == 'release'
6667 steps :
67- - uses : actions/checkout@v4
68- - name : Set up Python
69- uses : actions /setup-python@v5
68+ - uses : actions/checkout@v5
69+ - name : Install uv
70+ uses : astral-sh /setup-uv@v7
7071 with :
71- python-version : ${{ env.LATEST_PY_VERSION }}
72+ version : " 0.9.*"
73+ enable-cache : true
74+ python-version : ${{ matrix.python-version }}
7275
7376 - name : Install dependencies
7477 run : |
75- python -m pip install --upgrade pip
76- python -m pip install wheel twine build
77- python -m pip install .
78+ uv sync
7879
7980 - name : Set tag version
8081 id : tag
@@ -90,12 +91,12 @@ jobs:
9091 - name : Build and publish
9192 if : ${{ steps.tag.outputs.version }} == ${{ steps.module.outputs.version}}
9293 env :
93- TWINE_USERNAME : ${{ secrets.PYPI_USERNAME }}
94- TWINE_PASSWORD : ${{ secrets.PYPI_PASSWORD }}
94+ UV_PUBLISH_USERNAME : ${{ secrets.PYPI_USERNAME }}
95+ UV_PUBLISH_PASSWORD : ${{ secrets.PYPI_PASSWORD }}
9596 run : |
9697 rm -rf dist
97- python -m build
98- twine upload dist/*
98+ uv build
99+ uv publish dist/*
99100
100101 publish-docker :
101102 needs : [tests]
@@ -105,7 +106,7 @@ jobs:
105106
106107 steps :
107108 - name : Checkout
108- uses : actions/checkout@v4
109+ uses : actions/checkout@v5
109110
110111 - name : Set up QEMU
111112 uses : docker/setup-qemu-action@v3
0 commit comments