@@ -22,134 +22,113 @@ jobs:
22
22
name : test
23
23
runs-on : ${{ matrix.os }}
24
24
strategy :
25
- # Allow other matrix jobs to complete if 1 fails
26
- fail-fast : false
27
25
matrix :
28
26
python-version :
29
27
- " 3.10"
30
28
- " 3.11"
31
29
- " 3.12"
30
+ - " 3.13"
32
31
os :
33
32
- ubuntu-latest
34
33
- windows-latest
35
34
- macos-latest
36
-
35
+ exclude :
36
+ # https://github.com/stac-utils/pystac/issues/1470
37
+ - os : windows-latest
38
+ python-version : " 3.13"
37
39
steps :
38
40
- 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
42
42
with :
43
43
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'
51
51
shell : bash
52
52
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
54
58
55
59
coverage :
56
60
name : coverage
57
61
runs-on : ubuntu-latest
58
62
steps :
59
63
- uses : actions/checkout@v4
60
-
61
- - name : Set up Python 3.10
62
- uses : actions/setup-python@v5
64
+ - uses : actions/setup-python@v5
63
65
with :
64
66
python-version : " 3.10"
65
- cache : " pip"
66
-
67
+ - uses : astral-sh/setup-uv@v3
68
+ with :
69
+ enable-cache : true
67
70
- name : Install with dependencies
68
- run : pip install .[validation] -r requirements-dev.txt
69
-
71
+ run : uv sync --all-extras
70
72
- name : Run coverage with orjson
71
- run : pytest tests --cov
72
-
73
+ run : uv run pytest tests --cov
73
74
- name : Uninstall orjson
74
- run : pip uninstall -y orjson
75
-
75
+ run : uv pip uninstall orjson
76
76
- name : Run coverage without orjson, appending results
77
- run : pytest tests --cov --cov-append
78
-
77
+ run : uv run pytest tests --cov --cov-append
79
78
- name : Prepare ./coverage.xml
80
79
# Ignore the configured fail-under to ensure we upload the coverage report. We
81
80
# 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
84
82
- name : Upload All coverage to Codecov
85
83
uses : codecov/codecov-action@v4
86
84
if : ${{ env.GITHUB_REPOSITORY }} == 'stac-utils/pystac'
87
85
with :
88
86
token : ${{ secrets.CODECOV_TOKEN }}
89
87
file : ./coverage.xml
90
88
fail_ci_if_error : false
91
-
92
89
- name : Check for coverage drop
93
90
# This will use the configured fail-under, causing this job to fail if the
94
91
# coverage drops.
95
- run : coverage report
92
+ run : uv run coverage report
96
93
97
94
lint :
98
95
runs-on : ubuntu-latest
99
96
strategy :
100
- # Allow other matrix jobs to complete if 1 fails
101
- fail-fast : false
102
97
matrix :
103
98
python-version :
104
99
- " 3.10"
105
100
- " 3.11"
106
101
- " 3.12"
107
-
102
+ - " 3.13 "
108
103
steps :
109
104
- 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
113
106
with :
114
107
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
120
113
- name : Execute linters & type checkers
121
- run : pre-commit run --all-files
114
+ run : uv run pre-commit run --all-files
122
115
123
116
without-orjson :
124
117
runs-on : ubuntu-latest
125
118
steps :
126
119
- uses : actions/checkout@v4
127
-
128
120
- uses : actions/setup-python@v5
129
121
with :
130
122
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
135
128
- name : Uninstall orjson
136
- run : pip uninstall -y orjson
137
-
129
+ run : uv pip uninstall orjson
138
130
- 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
153
132
154
133
check-benchmarks :
155
134
# This checks to make sure any API changes haven't broken any of the
@@ -161,13 +140,15 @@ jobs:
161
140
- uses : actions/setup-python@v5
162
141
with :
163
142
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
167
148
- name : Set asv machine
168
- run : asv machine --yes
149
+ run : uv run asv machine --yes
169
150
- 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
171
152
172
153
docs :
173
154
runs-on : ubuntu-latest
@@ -176,10 +157,12 @@ jobs:
176
157
- uses : actions/setup-python@v5
177
158
with :
178
159
python-version : " 3.10"
179
- cache : " pip"
160
+ - uses : astral-sh/setup-uv@v3
161
+ with :
162
+ enable-cache : true
180
163
- name : Install pandoc
181
164
run : sudo apt-get install pandoc
182
165
- name : Install pystac
183
- run : pip install . -r docs/requirements -docs.txt
166
+ run : uv sync --no-dev && uv sync --package pystac -docs --inexact
184
167
- 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