Use singular field key names: include
and exclude
#1703
Workflow file for this run
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
name: CI | |
on: | |
push: | |
branches: | |
- main | |
pull_request: | |
concurrency: | |
# Cancel running job if another commit is pushed to the branch | |
group: ${{ github.ref }} | |
cancel-in-progress: true | |
jobs: | |
build: | |
name: build | |
runs-on: ${{ matrix.os }} | |
strategy: | |
fail-fast: false | |
matrix: | |
python-version: | |
- "3.9" | |
- "3.10" | |
- "3.11" | |
- "3.12" | |
os: | |
- ubuntu-latest | |
- windows-latest | |
- macos-latest | |
exclude: # macos-latest is arm64, which doesn't have this python | |
- os: macos-latest | |
python-version: "3.9" | |
steps: | |
- uses: actions/checkout@v4 | |
- name: Set up Python ${{ matrix.python-version }} | |
uses: actions/setup-python@v5 | |
with: | |
python-version: ${{ matrix.python-version }} | |
- 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: uv pip install --system .[dev] | |
- name: Run pre-commit | |
run: pre-commit run --all-files | |
- name: Run pytest | |
run: pytest -Werror -s --block-network --cov pystac_client --cov-report term-missing | |
- name: Run coverage | |
run: coverage xml | |
- name: Upload All coverage to Codecov | |
uses: codecov/codecov-action@v4 | |
with: | |
token: ${{ secrets.CODECOV_TOKEN }} | |
file: ./coverage.xml | |
fail_ci_if_error: false | |
min-versions: | |
name: min-versions | |
runs-on: ubuntu-latest | |
steps: | |
- uses: actions/checkout@v4 | |
- uses: actions/setup-python@v5 | |
with: | |
python-version: 3.9 | |
- 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 | |
runs-on: ubuntu-latest | |
# Required shell entrypoint to have properly activated conda environment | |
defaults: | |
run: | |
shell: bash -l {0} | |
steps: | |
- uses: actions/checkout@v4 | |
- name: Setup Conda Environment | |
uses: conda-incubator/[email protected] | |
with: | |
miniforge-variant: Mambaforge | |
miniforge-version: latest | |
python-version: 3.9 | |
use-mamba: true | |
channel-priority: strict | |
environment-file: ./docs/environment.yml | |
activate-environment: pystac-client-docs | |
auto-activate-base: false | |
- name: Build docs | |
run: ./scripts/build-docs | |
pre-release: | |
name: pre-release | |
runs-on: ubuntu-latest | |
steps: | |
- uses: actions/checkout@v4 | |
- uses: actions/setup-python@v5 | |
with: | |
python-version: 3.9 | |
- 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: uv pip install --system -U --pre pystac | |
- name: Run pytest | |
run: pytest -Werror -s --block-network | |
upstream: | |
name: upstream | |
runs-on: ubuntu-latest | |
if: github.event_name != 'pull_request' | |
steps: | |
- uses: actions/checkout@v4 | |
- uses: actions/setup-python@v5 | |
with: | |
python-version: 3.9 | |
- name: Download uv | |
run: curl -LsSf https://astral.sh/uv/install.sh | sh | |
- name: Install | |
run: uv pip install --system .[dev] | |
- name: Install pystac from main | |
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 | |
runs-on: ubuntu-latest | |
steps: | |
- uses: actions/checkout@v4 | |
- uses: actions/setup-python@v5 | |
with: | |
python-version: 3.9 | |
- 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: uv pip install --system .[dev,docs] |