@@ -22,134 +22,113 @@ jobs:
2222 name : test
2323 runs-on : ${{ matrix.os }}
2424 strategy :
25- # Allow other matrix jobs to complete if 1 fails
26- fail-fast : false
2725 matrix :
2826 python-version :
2927 - " 3.10"
3028 - " 3.11"
3129 - " 3.12"
30+ - " 3.13"
3231 os :
3332 - ubuntu-latest
3433 - windows-latest
3534 - macos-latest
36-
35+ exclude :
36+ # https://github.com/stac-utils/pystac/issues/1470
37+ - os : windows-latest
38+ python-version : " 3.13"
3739 steps :
3840 - uses : actions/checkout@v4
39-
40- - name : Set up Python ${{ matrix.python-version }}
41- uses : actions/setup-python@v5
41+ - uses : actions/setup-python@v5
4242 with :
4343 python-version : ${{ matrix.python-version }}
44- cache : " pip "
45-
46- - name : Install dependencies
47- run : pip install .[validation] -r requirements-dev.txt
48-
49- - name : Execute test suite
50- run : ./scripts/test
44+ - uses : astral-sh/setup-uv@v3
45+ with :
46+ enable-cache : true
47+ - name : Sync
48+ run : uv sync --all-extras
49+ - name : Test on windows
50+ if : runner.os == 'Windows'
5151 shell : bash
5252 env :
53- TMPDIR : " ${{ matrix.os == 'windows-latest' && 'D:\\ a\\ _temp' || '' }}"
53+ TMPDIR : ' D:\\a\\_temp'
54+ run : uv run pytest tests
55+ - name : Test
56+ if : runner.os != 'Windows'
57+ run : uv run scripts/test
5458
5559 coverage :
5660 name : coverage
5761 runs-on : ubuntu-latest
5862 steps :
5963 - uses : actions/checkout@v4
60-
61- - name : Set up Python 3.10
62- uses : actions/setup-python@v5
64+ - uses : actions/setup-python@v5
6365 with :
6466 python-version : " 3.10"
65- cache : " pip"
66-
67+ - uses : astral-sh/setup-uv@v3
68+ with :
69+ enable-cache : true
6770 - name : Install with dependencies
68- run : pip install .[validation] -r requirements-dev.txt
69-
71+ run : uv sync --all-extras
7072 - name : Run coverage with orjson
71- run : pytest tests --cov
72-
73+ run : uv run pytest tests --cov
7374 - name : Uninstall orjson
74- run : pip uninstall -y orjson
75-
75+ run : uv pip uninstall orjson
7676 - name : Run coverage without orjson, appending results
77- run : pytest tests --cov --cov-append
78-
77+ run : uv run pytest tests --cov --cov-append
7978 - name : Prepare ./coverage.xml
8079 # Ignore the configured fail-under to ensure we upload the coverage report. We
8180 # will trigger a failure for coverage drops in a later job
82- run : coverage xml --fail-under 0
83-
81+ run : uv run coverage xml --fail-under 0
8482 - name : Upload All coverage to Codecov
8583 uses : codecov/codecov-action@v4
8684 if : ${{ env.GITHUB_REPOSITORY }} == 'stac-utils/pystac'
8785 with :
8886 token : ${{ secrets.CODECOV_TOKEN }}
8987 file : ./coverage.xml
9088 fail_ci_if_error : false
91-
9289 - name : Check for coverage drop
9390 # This will use the configured fail-under, causing this job to fail if the
9491 # coverage drops.
95- run : coverage report
92+ run : uv run coverage report
9693
9794 lint :
9895 runs-on : ubuntu-latest
9996 strategy :
100- # Allow other matrix jobs to complete if 1 fails
101- fail-fast : false
10297 matrix :
10398 python-version :
10499 - " 3.10"
105100 - " 3.11"
106101 - " 3.12"
107-
102+ - " 3.13 "
108103 steps :
109104 - uses : actions/checkout@v4
110-
111- - name : Set up Python ${{ matrix.python-version }}
112- uses : actions/setup-python@v5
105+ - uses : actions/setup-python@v5
113106 with :
114107 python-version : ${{ matrix.python-version }}
115- cache : " pip "
116-
117- - name : Install with test dependencies
118- run : pip install . -r requirements-dev.txt
119-
108+ - uses : astral-sh/setup-uv@v3
109+ with :
110+ enable-cache : true
111+ - name : Sync
112+ run : uv sync
120113 - name : Execute linters & type checkers
121- run : pre-commit run --all-files
114+ run : uv run pre-commit run --all-files
122115
123116 without-orjson :
124117 runs-on : ubuntu-latest
125118 steps :
126119 - uses : actions/checkout@v4
127-
128120 - uses : actions/setup-python@v5
129121 with :
130122 python-version : " 3.10"
131-
132- - name : Install
133- run : pip install .[validation] -r requirements-dev.txt
134-
123+ - uses : astral-sh/setup-uv@v3
124+ with :
125+ enable-cache : true
126+ - name : Sync
127+ run : uv sync
135128 - name : Uninstall orjson
136- run : pip uninstall -y orjson
137-
129+ run : uv pip uninstall orjson
138130 - name : Run tests
139- run : pytest tests
140-
141- check-all-dependencies :
142- runs-on : ubuntu-latest
143- steps :
144- - uses : actions/checkout@v4
145-
146- - uses : actions/setup-python@v5
147- with :
148- python-version : " 3.10"
149- cache : " pip"
150-
151- - name : Install all dependencies
152- run : pip install .[orjson,urllib3,validation,jinja2]
131+ run : uv run pytest tests
153132
154133 check-benchmarks :
155134 # This checks to make sure any API changes haven't broken any of the
@@ -161,13 +140,15 @@ jobs:
161140 - uses : actions/setup-python@v5
162141 with :
163142 python-version : " 3.10"
164- cache : " pip"
165- - name : Install pystac
166- run : pip install . -r requirements-dev.txt
143+ - uses : astral-sh/setup-uv@v3
144+ with :
145+ enable-cache : true
146+ - name : Sync
147+ run : uv sync
167148 - name : Set asv machine
168- run : asv machine --yes
149+ run : uv run asv machine --yes
169150 - name : Check benchmarks
170- run : asv run -a repeat=1 -a rounds=1 HEAD
151+ run : uv run asv run -a repeat=1 -a rounds=1 HEAD
171152
172153 docs :
173154 runs-on : ubuntu-latest
@@ -176,10 +157,12 @@ jobs:
176157 - uses : actions/setup-python@v5
177158 with :
178159 python-version : " 3.10"
179- cache : " pip"
160+ - uses : astral-sh/setup-uv@v3
161+ with :
162+ enable-cache : true
180163 - name : Install pandoc
181164 run : sudo apt-get install pandoc
182165 - name : Install pystac
183- run : pip install . -r docs/requirements -docs.txt
166+ run : uv sync --no-dev && uv sync --package pystac -docs --inexact
184167 - name : Check docs
185- run : make -C docs html SPHINXOPTS="-W --keep-going"
168+ run : uv run make -C docs html SPHINXOPTS="-W --keep-going"
0 commit comments