Skip to content

Commit

Permalink
ci: switch to uv
Browse files Browse the repository at this point in the history
From my reading, it looks like the caching doesn't get us much, so I removed it.
  • Loading branch information
gadomski committed Apr 2, 2024
1 parent 5bbdbe0 commit a2133ec
Show file tree
Hide file tree
Showing 3 changed files with 32 additions and 65 deletions.
53 changes: 31 additions & 22 deletions .github/workflows/continuous-integration.yml
Original file line number Diff line number Diff line change
Expand Up @@ -33,9 +33,14 @@ jobs:
uses: actions/setup-python@v5
with:
python-version: ${{ matrix.python-version }}
cache: "pip"
- name: Download uv (non-Windows)
if: ${{ runner.os != 'Windows' }}
run: curl -LsSf https://astral.sh/uv/install.sh | sh
- name: Download uv (Windows)
if: ${{ runner.os == 'Windows' }}
run: irm https://astral.sh/uv/install.ps1 | iex
- name: Install package with dev requirements
run: pip install .[dev]
run: uv pip install --system .[dev]
- name: Run pre-commit
run: pre-commit run --all-files
- name: Run pytest
Expand All @@ -57,13 +62,14 @@ jobs:
- uses: actions/setup-python@v5
with:
python-version: 3.9
cache: "pip"
- name: Install with dev requirements
run: pip install .[dev]
- name: Install minimum requirements
run: ./scripts/install-min-requirements
- name: Test
run: ./scripts/test
- name: Download uv
run: curl -LsSf https://astral.sh/uv/install.sh | sh
- name: Install dev requirements
run: uv pip install --system .[dev]
- name: Install with min requirements
run: uv pip install --system --resolution=lowest-direct --reinstall .
- name: Run pytest
run: pytest -Werror -s --block-network

docs:
name: docs
Expand Down Expand Up @@ -96,13 +102,14 @@ jobs:
- uses: actions/setup-python@v5
with:
python-version: 3.9
cache: "pip"
- name: Install
run: pip install .[dev]
- name: Download uv
run: curl -LsSf https://astral.sh/uv/install.sh | sh
- name: Install with dev requirements
run: uv pip install --system --pre .[dev]
- name: Install any pre-releases of pystac
run: pip install -U --pre pystac
- name: Test
run: ./scripts/test
run: uv pip install --system -U --pre pystac
- name: Run pytest
run: pytest -Werror -s --block-network

upstream:
name: upstream
Expand All @@ -113,13 +120,14 @@ jobs:
- uses: actions/setup-python@v5
with:
python-version: 3.9
cache: "pip"
- name: Download uv
run: curl -LsSf https://astral.sh/uv/install.sh | sh
- name: Install
run: pip install .[dev]
run: uv pip install .[dev]
- name: Install pystac from main
run: pip install --force-reinstall git+https://github.com/stac-utils/pystac.git
- name: Test
run: ./scripts/test
run: uv pip install --system --force-reinstall git+https://github.com/stac-utils/pystac.git
- name: Run pytest
run: pytest -Werror -s --block-network

dev-and-docs-requirements:
name: dev and docs requirements check
Expand All @@ -129,8 +137,9 @@ jobs:
- uses: actions/setup-python@v5
with:
python-version: 3.9
cache: "pip"
- name: Download uv
run: curl -LsSf https://astral.sh/uv/install.sh | sh
- name: Install geos
run: sudo apt -y install libgeos-dev
- name: Install
run: pip install .[dev,docs]
run: uv pip install --system .[dev,docs]
1 change: 1 addition & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -10,6 +10,7 @@ and this project adheres to [Semantic Versioning](http://semver.org/spec/v2.0.0.
### Changed

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

## [v0.7.6]

Expand Down
43 changes: 0 additions & 43 deletions scripts/install-min-requirements

This file was deleted.

0 comments on commit a2133ec

Please sign in to comment.