55 pull_request :
66 branches : [main]
77
8+ env :
9+ LATEST_PY_VERSION : ' 3.14'
10+
811jobs :
912 test :
1013 runs-on : ubuntu-latest
1114 strategy :
1215 matrix :
13- python-version : ["3.9", "3.10", "3.11", "3.12", "3.13"]
16+ python-version : ["3.9", "3.10", "3.11", "3.12", "3.13", "3.14" ]
1417 timeout-minutes : 20
1518
1619 steps :
1720 - name : Check out repository code
1821 uses : actions/checkout@v5
19-
20- # Setup Python (faster than using Python container)
21- - name : Setup Python
22- uses : actions/setup-python@v6
22+
23+ - name : Install uv
24+ uses : astral-sh/setup-uv@v7
2325 with :
24- python-version : ${{ matrix.python-version }}
25-
26- - name : Lint code
27- if : ${{ matrix.python-version == 3.13 }}
28- run : |
29- python -m pip install pre-commit
30- pre-commit run --all-files
26+ version : " 0.9.*"
27+ enable-cache : true
28+
29+ - name : Set up Python ${{ matrix.python-version }}
30+ run : uv python install ${{ matrix.python-version }}
3131
32- - name : Install types
32+ - name : Install dependencies
3333 run : |
34- python -m pip install ./stac_fastapi/types[dev]
34+ uv sync
3535
36- - name : Install core api
37- run : |
38- python -m pip install ./stac_fastapi/api[dev]
39-
40- - name : Install Extensions
36+ - name : Lint code
37+ if : ${{ matrix.python-version == env.LATEST_PY_VERSION }}
4138 run : |
42- python -m pip install ./stac_fastapi/extensions[dev]
39+ uv run pre-commit run --all-files
4340
44- - name : Test
45- run : python -m pytest -svvv
41+ - name : Run tests
42+ run : uv run pytest -svvv
4643 env :
4744 ENVIRONMENT : testing
4845
4946 test-docs :
5047 runs-on : ubuntu-latest
5148 steps :
52- - uses : actions/checkout@v5
53- - name : Test generating docs
54- run : make docs
49+ - name : Checkout main
50+ uses : actions/checkout@v5
51+
52+ - name : Install uv
53+ uses : astral-sh/setup-uv@v7
54+ with :
55+ version : " 0.9.*"
56+ enable-cache : true
57+
58+ - name : Test docs
59+ run : |
60+ uv run --group docs mkdocs build -f docs/mkdocs.yml
5561
5662 benchmark :
5763 needs : [test]
@@ -60,25 +66,18 @@ jobs:
6066 - name : Check out repository code
6167 uses : actions/checkout@v5
6268
63- - name : Setup Python
64- uses : actions /setup-python@v6
69+ - name : Install uv
70+ uses : astral-sh /setup-uv@v7
6571 with :
66- python-version : " 3.13"
67-
68- - name : Install types
69- run : |
70- python -m pip install ./stac_fastapi/types[dev]
71-
72- - name : Install core api
73- run : |
74- python -m pip install ./stac_fastapi/api[dev,benchmark]
75-
76- - name : Install extensions
72+ version : " 0.9.*"
73+ enable-cache : true
74+
75+ - name : Install dependencies
7776 run : |
78- python -m pip install ./stac_fastapi/extensions
77+ uv sync
7978
8079 - name : Run Benchmark
81- run : python -m pytest stac_fastapi/api/tests/benchmarks.py --benchmark-only --benchmark-columns 'min, max, mean, median' --benchmark-json output.json
80+ run : uv run pytest stac_fastapi/api/tests/benchmarks.py --benchmark-only --benchmark-columns 'min, max, mean, median' --benchmark-json output.json
8281
8382 - name : Store and benchmark result
8483 if : github.repository == 'stac-utils/stac-fastapi'
0 commit comments