77 pull_request :
88
99concurrency :
10- # Cancel running job if another commit is pushed to the branch
1110 group : ${{ github.ref }}
1211 cancel-in-progress : true
1312
1615 name : build
1716 runs-on : ${{ matrix.os }}
1817 strategy :
19- fail-fast : false
2018 matrix :
2119 python-version :
2220 - " 3.10"
@@ -28,114 +26,75 @@ jobs:
2826 - macos-latest
2927 steps :
3028 - 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
3330 with :
3431 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
4334 - name : Run pre-commit
44- run : pre-commit run --all-files
35+ run : uv run pre-commit run --all-files
4536 - 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
4738 - 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
5141 with :
5242 token : ${{ secrets.CODECOV_TOKEN }}
53- file : ./coverage.xml
43+ files : ./coverage.xml
5444 fail_ci_if_error : false
5545
5646 min-versions :
5747 name : min-versions
5848 runs-on : ubuntu-latest
5949 steps :
6050 - uses : actions/checkout@v4
61- - uses : actions /setup-python @v5
51+ - uses : astral-sh /setup-uv @v5
6252 with :
6353 python-version : " 3.10"
64- - name : Download uv
65- run : curl -LsSf https://astral.sh/uv/install.sh | sh
6654 - name : Install with min requirements
67- run : uv pip install --system --resolution=lowest-direct .
55+ run : uv sync --no-dev --resolution=lowest-direct
6856 - 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
9258
9359 pre-release :
9460 name : pre-release
9561 runs-on : ubuntu-latest
9662 steps :
9763 - 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
10567 - name : Install any pre-releases of pystac
106- run : uv pip install --system - U --pre pystac
68+ run : uv pip install -U --pre pystac
10769 - name : Run pytest
108- run : pytest -Werror -s --block-network
70+ run : uv run pytest -Werror -s --block-network
10971
11072 upstream :
11173 name : upstream
11274 runs-on : ubuntu-latest
11375 if : github.event_name != 'pull_request'
11476 steps :
11577 - 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
12381 - 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
12583 - name : Run pytest
126- run : pytest -Werror -s --block-network
84+ run : uv run pytest -Werror -s --block-network
12785
128- dev-and- docs-requirements :
129- name : dev and docs requirements check
86+ docs :
87+ name : docs
13088 runs-on : ubuntu-latest
89+ defaults :
90+ run :
91+ shell : bash -el {0}
13192 steps :
13293 - 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