7
7
pull_request :
8
8
9
9
concurrency :
10
- # Cancel running job if another commit is pushed to the branch
11
10
group : ${{ github.ref }}
12
11
cancel-in-progress : true
13
12
16
15
name : build
17
16
runs-on : ${{ matrix.os }}
18
17
strategy :
19
- fail-fast : false
20
18
matrix :
21
19
python-version :
22
20
- " 3.10"
@@ -28,114 +26,75 @@ jobs:
28
26
- macos-latest
29
27
steps :
30
28
- uses : actions/checkout@v4
31
- - name : Set up Python ${{ matrix.python-version }}
32
- uses : actions/setup-python@v5
29
+ - uses : astral-sh/setup-uv@v5
33
30
with :
34
31
python-version : ${{ matrix.python-version }}
35
- - name : Download uv (non-Windows)
36
- if : ${{ runner.os != 'Windows' }}
37
- run : curl -LsSf https://astral.sh/uv/install.sh | sh
38
- - name : Download uv (Windows)
39
- if : ${{ runner.os == 'Windows' }}
40
- run : irm https://astral.sh/uv/install.ps1 | iex
41
- - name : Install package with dev requirements
42
- run : uv pip install --system .[dev]
32
+ - name : Sync
33
+ run : uv sync
43
34
- name : Run pre-commit
44
- run : pre-commit run --all-files
35
+ run : uv run pre-commit run --all-files
45
36
- name : Run pytest
46
- run : pytest -Werror -s --block-network --cov pystac_client --cov-report term-missing
37
+ run : uv run pytest -Werror -s --block-network --cov pystac_client --cov-report term-missing
47
38
- name : Run coverage
48
- run : coverage xml
49
- - name : Upload All coverage to Codecov
50
- uses : codecov/codecov-action@v5
39
+ run : uv run coverage xml
40
+ - uses : codecov/codecov-action@v5
51
41
with :
52
42
token : ${{ secrets.CODECOV_TOKEN }}
53
- file : ./coverage.xml
43
+ files : ./coverage.xml
54
44
fail_ci_if_error : false
55
45
56
46
min-versions :
57
47
name : min-versions
58
48
runs-on : ubuntu-latest
59
49
steps :
60
50
- uses : actions/checkout@v4
61
- - uses : actions /setup-python @v5
51
+ - uses : astral-sh /setup-uv @v5
62
52
with :
63
53
python-version : " 3.10"
64
- - name : Download uv
65
- run : curl -LsSf https://astral.sh/uv/install.sh | sh
66
54
- name : Install with min requirements
67
- run : uv pip install --system --resolution=lowest-direct .
55
+ run : uv sync --no-dev --resolution=lowest-direct
68
56
- name : Run smoke test
69
- run : stac-client search https://planetarycomputer.microsoft.com/api/stac/v1 -c sentinel-2-l2a --max-items 1
70
-
71
- docs :
72
- name : docs
73
- runs-on : ubuntu-latest
74
- # Required shell entrypoint to have properly activated conda environment
75
- defaults :
76
- run :
77
- shell : bash -l {0}
78
- steps :
79
- - uses : actions/checkout@v4
80
- - name : Setup Conda Environment
81
- uses :
conda-incubator/[email protected]
82
- with :
83
- miniforge-version : latest
84
- python-version : " 3.10"
85
- use-mamba : true
86
- channel-priority : strict
87
- environment-file : ./docs/environment.yml
88
- activate-environment : pystac-client-docs
89
- auto-activate-base : false
90
- - name : Build docs
91
- run : ./scripts/build-docs
57
+ run : stac-client search https://landsatlook.usgs.gov/stac-server -c landsat-c2l2-sr --max-items 1
92
58
93
59
pre-release :
94
60
name : pre-release
95
61
runs-on : ubuntu-latest
96
62
steps :
97
63
- uses : actions/checkout@v4
98
- - uses : actions/setup-python@v5
99
- with :
100
- python-version : " 3.10"
101
- - name : Download uv
102
- run : curl -LsSf https://astral.sh/uv/install.sh | sh
103
- - name : Install with dev requirements
104
- run : uv pip install --system --pre .[dev]
64
+ - uses : astral-sh/setup-uv@v5
65
+ - name : Sync
66
+ run : uv sync
105
67
- name : Install any pre-releases of pystac
106
- run : uv pip install --system - U --pre pystac
68
+ run : uv pip install -U --pre pystac
107
69
- name : Run pytest
108
- run : pytest -Werror -s --block-network
70
+ run : uv run pytest -Werror -s --block-network
109
71
110
72
upstream :
111
73
name : upstream
112
74
runs-on : ubuntu-latest
113
75
if : github.event_name != 'pull_request'
114
76
steps :
115
77
- uses : actions/checkout@v4
116
- - uses : actions/setup-python@v5
117
- with :
118
- python-version : " 3.10"
119
- - name : Download uv
120
- run : curl -LsSf https://astral.sh/uv/install.sh | sh
121
- - name : Install
122
- run : uv pip install --system .[dev]
78
+ - uses : astral-sh/setup-uv@v5
79
+ - name : Sync
80
+ run : uv sync
123
81
- name : Install pystac from main
124
- run : uv pip install --system -- force-reinstall git+https://github.com/stac-utils/pystac.git
82
+ run : uv pip install --force-reinstall git+https://github.com/stac-utils/pystac.git
125
83
- name : Run pytest
126
- run : pytest -Werror -s --block-network
84
+ run : uv run pytest -Werror -s --block-network
127
85
128
- dev-and- docs-requirements :
129
- name : dev and docs requirements check
86
+ docs :
87
+ name : docs
130
88
runs-on : ubuntu-latest
89
+ defaults :
90
+ run :
91
+ shell : bash -el {0}
131
92
steps :
132
93
- uses : actions/checkout@v4
133
- - uses : actions/setup-python@v5
134
- with :
135
- python-version : " 3.10"
136
- - name : Download uv
137
- run : curl -LsSf https://astral.sh/uv/install.sh | sh
138
- - name : Install geos
139
- run : sudo apt -y install libgeos-dev
140
- - name : Install
141
- run : uv pip install --system .[dev,docs]
94
+ - uses : astral-sh/setup-uv@v5
95
+ - name : Install pandoc
96
+ run : sudo apt-get install -y pandoc
97
+ - name : Sync
98
+ run : uv sync --group docs
99
+ - name : Build docs
100
+ run : ./scripts/build-docs
0 commit comments