Skip to content

Commit fa4206f

Browse files
authored
ci: switch to uv (#663)
From my reading, it looks like the caching doesn't get us much, so I removed it.
1 parent 5bbdbe0 commit fa4206f

File tree

3 files changed

+32
-65
lines changed

3 files changed

+32
-65
lines changed

.github/workflows/continuous-integration.yml

+31-22
Original file line numberDiff line numberDiff line change
@@ -33,9 +33,14 @@ jobs:
3333
uses: actions/setup-python@v5
3434
with:
3535
python-version: ${{ matrix.python-version }}
36-
cache: "pip"
36+
- name: Download uv (non-Windows)
37+
if: ${{ runner.os != 'Windows' }}
38+
run: curl -LsSf https://astral.sh/uv/install.sh | sh
39+
- name: Download uv (Windows)
40+
if: ${{ runner.os == 'Windows' }}
41+
run: irm https://astral.sh/uv/install.ps1 | iex
3742
- name: Install package with dev requirements
38-
run: pip install .[dev]
43+
run: uv pip install --system .[dev]
3944
- name: Run pre-commit
4045
run: pre-commit run --all-files
4146
- name: Run pytest
@@ -57,13 +62,14 @@ jobs:
5762
- uses: actions/setup-python@v5
5863
with:
5964
python-version: 3.9
60-
cache: "pip"
61-
- name: Install with dev requirements
62-
run: pip install .[dev]
63-
- name: Install minimum requirements
64-
run: ./scripts/install-min-requirements
65-
- name: Test
66-
run: ./scripts/test
65+
- name: Download uv
66+
run: curl -LsSf https://astral.sh/uv/install.sh | sh
67+
- name: Install dev requirements
68+
run: uv pip install --system .[dev]
69+
- name: Install with min requirements
70+
run: uv pip install --system --resolution=lowest-direct --reinstall .
71+
- name: Run pytest
72+
run: pytest -Werror -s --block-network
6773

6874
docs:
6975
name: docs
@@ -96,13 +102,14 @@ jobs:
96102
- uses: actions/setup-python@v5
97103
with:
98104
python-version: 3.9
99-
cache: "pip"
100-
- name: Install
101-
run: pip install .[dev]
105+
- name: Download uv
106+
run: curl -LsSf https://astral.sh/uv/install.sh | sh
107+
- name: Install with dev requirements
108+
run: uv pip install --system --pre .[dev]
102109
- name: Install any pre-releases of pystac
103-
run: pip install -U --pre pystac
104-
- name: Test
105-
run: ./scripts/test
110+
run: uv pip install --system -U --pre pystac
111+
- name: Run pytest
112+
run: pytest -Werror -s --block-network
106113

107114
upstream:
108115
name: upstream
@@ -113,13 +120,14 @@ jobs:
113120
- uses: actions/setup-python@v5
114121
with:
115122
python-version: 3.9
116-
cache: "pip"
123+
- name: Download uv
124+
run: curl -LsSf https://astral.sh/uv/install.sh | sh
117125
- name: Install
118-
run: pip install .[dev]
126+
run: uv pip install .[dev]
119127
- name: Install pystac from main
120-
run: pip install --force-reinstall git+https://github.com/stac-utils/pystac.git
121-
- name: Test
122-
run: ./scripts/test
128+
run: uv pip install --system --force-reinstall git+https://github.com/stac-utils/pystac.git
129+
- name: Run pytest
130+
run: pytest -Werror -s --block-network
123131

124132
dev-and-docs-requirements:
125133
name: dev and docs requirements check
@@ -129,8 +137,9 @@ jobs:
129137
- uses: actions/setup-python@v5
130138
with:
131139
python-version: 3.9
132-
cache: "pip"
140+
- name: Download uv
141+
run: curl -LsSf https://astral.sh/uv/install.sh | sh
133142
- name: Install geos
134143
run: sudo apt -y install libgeos-dev
135144
- name: Install
136-
run: pip install .[dev,docs]
145+
run: uv pip install --system .[dev,docs]

CHANGELOG.md

+1
Original file line numberDiff line numberDiff line change
@@ -10,6 +10,7 @@ and this project adheres to [Semantic Versioning](http://semver.org/spec/v2.0.0.
1010
### Changed
1111

1212
- Updated to **pystac** v1.10.0 [#661](https://github.com/stac-utils/pystac-client/pull/661)
13+
- Use [uv](https://github.com/astral-sh/uv) for CI [#663](https://github.com/stac-utils/pystac-client/pull/663)
1314

1415
## [v0.7.6]
1516

scripts/install-min-requirements

-43
This file was deleted.

0 commit comments

Comments
 (0)