@@ -9,51 +9,21 @@ permissions:
99 contents : read
1010
1111jobs :
12- # Inspiration taken from https://jacobian.org/til/github-actions-poetry/
1312 run-tests :
1413 runs-on : ubuntu-latest
1514 steps :
1615 - uses : actions/checkout@v3
1716
18- - name : Set up Python 3.10
19- uses : actions/setup-python@v3
17+ - name : Set up Python
18+ uses : actions/setup-python@v5
2019 with :
21- python-version : " 3.10 "
20+ python-version-file : " pyproject.toml "
2221
23- - name : Cache Poetry install
24- uses : actions/cache@v2
25- with :
26- path : ~/.local
27- key : poetry-1.1.14-0
28-
29- - uses : snok/install-poetry@v1
30- with :
31- version : 1.1.14
32- virtualenvs-create : true
33- virtualenvs-in-project : true
34-
35- - name : Cache dependencies
36- uses : actions/cache@v2
37- with :
38- path : .venv
39- key : pydeps-${{ hashFiles('**/poetry.lock') }}
40-
41- - name : Install dependencies (if uncached)
42- run : poetry install --no-interaction --no-root
43- if : steps.cache-deps.outputs.cache-hit != 'true'
44-
45- - name : Install netplay-index
46- run : poetry install --no-interaction
47-
48- - name : Run unit tests
49- run : poetry run pytest --cov=netplay_index
50- env :
51- GEOIP_DATABASE_PATH : testdata/GeoLite2-Country.mmdb
22+ - name : Install uv
23+ uses : astral-sh/setup-uv@v6
5224
53- - name : Upload coverage information
54- run : poetry run coveralls --service=github
55- env :
56- GITHUB_TOKEN : ${{ secrets.GITHUB_TOKEN }}
25+ - name : Sync dependencies
26+ run : uv sync --locked --all-extras --dev
5727
5828 - name : Check coding style
59- run : poetry run black --check .
29+ run : uv run black --check .
0 commit comments