@@ -22,134 +22,109 @@ 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 :
29- - " 3.9"
3027 - " 3.10"
3128 - " 3.11"
29+ - " 3.12"
30+ - " 3.13"
3231 os :
3332 - ubuntu-latest
3433 - windows-latest
3534 - macos-latest
36-
3735 steps :
3836 - uses : actions/checkout@v4
39-
40- - name : Set up Python ${{ matrix.python-version }}
41- uses : actions/setup-python@v5
37+ - uses : actions/setup-python@v5
4238 with :
4339 python-version : ${{ matrix.python-version }}
44- cache : " pip "
45-
46- - name : Install dependencies
47- run : pip install .[validation,test]
48-
49- - name : Execute test suite
50- run : ./scripts/test
40+ - uses : astral-sh/setup-uv@v5
41+ with :
42+ enable-cache : true
43+ - name : Sync
44+ run : uv sync --all-extras
45+ - name : Test on windows
46+ if : runner.os == 'Windows'
5147 shell : bash
5248 env :
53- TMPDIR : " ${{ matrix.os == 'windows-latest' && 'D:\\ a\\ _temp' || '' }}"
49+ TMPDIR : ' D:\\a\\_temp'
50+ run : uv run pytest tests
51+ - name : Test
52+ if : runner.os != 'Windows'
53+ run : uv run scripts/test
5454
5555 coverage :
5656 name : coverage
5757 runs-on : ubuntu-latest
5858 steps :
5959 - uses : actions/checkout@v4
60-
61- - name : Set up Python 3.9
62- uses : actions/setup-python@v5
60+ - uses : actions/setup-python@v5
6361 with :
64- python-version : " 3.9"
65- cache : " pip"
66-
62+ python-version : " 3.10"
63+ - uses : astral-sh/setup-uv@v5
64+ with :
65+ enable-cache : true
6766 - name : Install with dependencies
68- run : pip install .[validation,test]
69-
67+ run : uv sync --all-extras
7068 - name : Run coverage with orjson
71- run : pytest tests --cov
72-
69+ run : uv run pytest tests --cov
7370 - name : Uninstall orjson
74- run : pip uninstall -y orjson
75-
71+ run : uv pip uninstall orjson
7672 - name : Run coverage without orjson, appending results
77- run : pytest tests --cov --cov-append
78-
73+ run : uv run pytest tests --cov --cov-append
7974 - name : Prepare ./coverage.xml
8075 # Ignore the configured fail-under to ensure we upload the coverage report. We
8176 # will trigger a failure for coverage drops in a later job
82- run : coverage xml --fail-under 0
83-
77+ run : uv run coverage xml --fail-under 0
8478 - name : Upload All coverage to Codecov
85- uses : codecov/codecov-action@v3
79+ uses : codecov/codecov-action@v5
8680 if : ${{ env.GITHUB_REPOSITORY }} == 'stac-utils/pystac'
8781 with :
8882 token : ${{ secrets.CODECOV_TOKEN }}
8983 file : ./coverage.xml
9084 fail_ci_if_error : false
91-
9285 - name : Check for coverage drop
9386 # This will use the configured fail-under, causing this job to fail if the
9487 # coverage drops.
95- run : coverage report
88+ run : uv run coverage report
9689
9790 lint :
9891 runs-on : ubuntu-latest
9992 strategy :
100- # Allow other matrix jobs to complete if 1 fails
101- fail-fast : false
10293 matrix :
10394 python-version :
104- - " 3.9"
10595 - " 3.10"
10696 - " 3.11"
107-
97+ - " 3.12"
98+ - " 3.13"
10899 steps :
109100 - uses : actions/checkout@v4
110-
111- - name : Set up Python ${{ matrix.python-version }}
112- uses : actions/setup-python@v5
101+ - uses : actions/setup-python@v5
113102 with :
114103 python-version : ${{ matrix.python-version }}
115- cache : " pip "
116-
117- - name : Install with test dependencies
118- run : pip install .[test]
119-
104+ - uses : astral-sh/setup-uv@v5
105+ with :
106+ enable-cache : true
107+ - name : Sync
108+ run : uv sync
120109 - name : Execute linters & type checkers
121- run : pre-commit run --all-files
110+ run : uv run pre-commit run --all-files
122111
123112 without-orjson :
124113 runs-on : ubuntu-latest
125114 steps :
126115 - uses : actions/checkout@v4
127-
128116 - uses : actions/setup-python@v5
129117 with :
130- python-version : " 3.9"
131-
132- - name : Install
133- run : pip install .[validation,test]
134-
118+ python-version : " 3.10"
119+ - uses : astral-sh/setup-uv@v5
120+ with :
121+ enable-cache : true
122+ - name : Sync
123+ run : uv sync
135124 - name : Uninstall orjson
136- run : pip uninstall -y orjson
137-
125+ run : uv pip uninstall orjson
138126 - 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.9"
149- cache : " pip"
150-
151- - name : Install all dependencies
152- run : pip install .[bench,docs,orjson,test,urllib3,validation]
127+ run : uv run pytest tests
153128
154129 check-benchmarks :
155130 # This checks to make sure any API changes haven't broken any of the
@@ -160,26 +135,30 @@ jobs:
160135 - uses : actions/checkout@v4
161136 - uses : actions/setup-python@v5
162137 with :
163- python-version : " 3.9"
164- cache : " pip"
165- - name : Install pystac
166- run : pip install .[bench]
138+ python-version : " 3.10"
139+ - uses : astral-sh/setup-uv@v5
140+ with :
141+ enable-cache : true
142+ - name : Sync
143+ run : uv sync
167144 - name : Set asv machine
168- run : asv machine --yes
145+ run : uv run asv machine --yes
169146 - name : Check benchmarks
170- run : asv run -a repeat=1 -a rounds=1 HEAD
147+ run : uv run asv run -a repeat=1 -a rounds=1 HEAD
171148
172149 docs :
173150 runs-on : ubuntu-latest
174151 steps :
175152 - uses : actions/checkout@v4
176153 - uses : actions/setup-python@v5
177154 with :
178- python-version : " 3.9"
179- cache : " pip"
155+ python-version : " 3.10"
156+ - uses : astral-sh/setup-uv@v5
157+ with :
158+ enable-cache : true
180159 - name : Install pandoc
181160 run : sudo apt-get install pandoc
182161 - name : Install pystac
183- run : pip install .[ docs]
162+ run : uv sync --no-dev && uv sync --package pystac- docs --inexact
184163 - name : Check docs
185- run : make -C docs html SPHINXOPTS="-W --keep-going"
164+ run : uv run make -C docs html SPHINXOPTS="-W --keep-going"
0 commit comments