Add tree structure #1343
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: | |
group: ${{ github.workflow }}-${{ github.ref }} | |
cancel-in-progress: true | |
env: | |
CARGO_TERM_COLOR: always | |
CARGO_TERM_VERBOSE: true | |
jobs: | |
test-core: | |
name: Test stac | |
runs-on: ${{ matrix.os }} | |
strategy: | |
fail-fast: false | |
matrix: | |
os: | |
- ubuntu-latest | |
- macos-latest | |
- windows-latest | |
steps: | |
- uses: actions/checkout@v4 | |
- uses: Swatinem/rust-cache@v2 | |
- name: Test | |
run: cargo test -p stac -p stac-types --all-features | |
check-features-core: | |
name: Check stac features | |
runs-on: ubuntu-latest | |
defaults: | |
run: | |
working-directory: crates/core | |
steps: | |
- uses: actions/checkout@v4 | |
- uses: Swatinem/rust-cache@v2 | |
- name: Install check-all-features | |
run: cargo install cargo-all-features | |
- name: Check | |
run: cargo check-all-features | |
test-api: | |
name: Test stac-api | |
runs-on: ubuntu-latest | |
steps: | |
- uses: actions/checkout@v4 | |
- uses: Swatinem/rust-cache@v2 | |
- name: Test | |
run: cargo test -p stac-api --all-features | |
test-cli: | |
name: Test stac-cli | |
runs-on: ubuntu-latest | |
defaults: | |
run: | |
working-directory: crates/cli | |
steps: | |
- uses: actions/checkout@v4 | |
- uses: dtolnay/[email protected] | |
- uses: Swatinem/rust-cache@v2 | |
- name: Test | |
run: cargo test -p stac-cli --all-features | |
test-cli-python: | |
name: Test stacrs-cli (python) | |
runs-on: ubuntu-latest | |
defaults: | |
run: | |
working-directory: crates/cli | |
steps: | |
- uses: actions/checkout@v4 | |
- uses: dtolnay/[email protected] | |
- uses: Swatinem/rust-cache@v2 | |
- uses: actions/setup-python@v5 | |
with: | |
python-version: 3.x | |
- uses: astral-sh/setup-uv@v3 | |
with: | |
enable-cache: true | |
- name: Install | |
run: uv sync | |
- name: Smoke test | |
run: uv run stacrs --version | |
test-duckdb: | |
name: Test stac-duckdb | |
runs-on: ubuntu-latest | |
steps: | |
- uses: actions/checkout@v4 | |
- uses: Swatinem/rust-cache@v2 | |
- name: Test | |
run: cargo test -p stac-duckdb -F duckdb/bundled | |
test-extensions: | |
name: Test stac-extensions | |
runs-on: ubuntu-latest | |
steps: | |
- uses: actions/checkout@v4 | |
- uses: Swatinem/rust-cache@v2 | |
- name: Test | |
run: cargo test -p stac-extensions | |
test-pgstac: | |
name: Test pgstac | |
runs-on: ubuntu-latest | |
services: | |
pgstac: | |
image: ghcr.io/stac-utils/pgstac:v0.8.6 | |
env: | |
POSTGRES_USER: username | |
POSTGRES_PASSWORD: password | |
POSTGRES_DB: postgis | |
PGUSER: username | |
PGPASSWORD: password | |
PGDATABASE: postgis | |
ports: | |
- 5432:5432 | |
steps: | |
- uses: actions/checkout@v4 | |
- uses: Swatinem/rust-cache@v2 | |
- uses: actions/setup-python@v5 | |
with: | |
python-version: "3.10" | |
- uses: astral-sh/setup-uv@v3 | |
with: | |
enable-cache: true | |
- name: Test | |
run: cargo test -p pgstac | |
- name: Install Python dependencies | |
run: uv sync --extra stac-api-validator | |
- name: Validate | |
run: uv run scripts/validate-stac-server --pgstac | |
test-python: | |
name: Test stacrs (python) | |
runs-on: ubuntu-latest | |
defaults: | |
run: | |
working-directory: python | |
steps: | |
- uses: actions/checkout@v4 | |
- uses: Swatinem/rust-cache@v2 | |
- uses: actions/setup-python@v5 | |
with: | |
python-version: 3.x | |
- uses: astral-sh/setup-uv@v3 | |
with: | |
enable-cache: true | |
- name: Install | |
run: uv sync | |
- name: Check | |
run: uv run ruff check && uv run ruff format --check && uv run mypy . | |
- name: Test | |
run: uv run pytest | |
test-server: | |
name: Test stac-server | |
runs-on: ubuntu-latest | |
steps: | |
- uses: actions/checkout@v4 | |
- uses: Swatinem/rust-cache@v2 | |
- uses: actions/setup-python@v5 | |
with: | |
python-version: "3.x" | |
- uses: astral-sh/setup-uv@v3 | |
with: | |
enable-cache: true | |
- name: Test | |
run: cargo test -p stac-server --all-features | |
- name: Install Python dependencies | |
run: uv sync --extra stac-api-validator | |
- name: Validate | |
run: uv run scripts/validate-stac-server | |
lint: | |
name: Lint | |
runs-on: ubuntu-latest | |
steps: | |
- uses: actions/checkout@v4 | |
- uses: Swatinem/rust-cache@v2 | |
- name: Fmt | |
run: cargo fmt | |
- name: Clippy | |
run: cargo clippy --workspace --all-features | |
check-nightly: | |
name: Check (nightly) | |
runs-on: ubuntu-latest | |
steps: | |
- uses: actions/checkout@v4 | |
- uses: dtolnay/rust-toolchain@nightly | |
- uses: Swatinem/rust-cache@v2 | |
- name: Check | |
run: cargo check --workspace --all-features | |
msrv: | |
runs-on: ubuntu-latest | |
steps: | |
- uses: actions/checkout@v4 | |
- uses: taiki-e/install-action@cargo-hack | |
- name: Check msrv | |
run: cargo hack check --rust-version --workspace --all-targets --ignore-private | |
doc: | |
name: Docs | |
runs-on: ubuntu-latest | |
env: | |
RUSTDOCFLAGS: -Dwarnings | |
steps: | |
- uses: actions/checkout@v4 | |
- uses: Swatinem/rust-cache@v2 | |
- uses: DavidAnson/markdownlint-cli2-action@v17 | |
- name: Doc | |
run: cargo doc --workspace --all-features | |
validate-stac-geoparquet: | |
name: Validate stac-geoparquet | |
runs-on: ubuntu-latest | |
steps: | |
- uses: actions/checkout@v4 | |
- uses: Swatinem/rust-cache@v2 | |
- uses: actions/setup-python@v5 | |
with: | |
python-version: "3.x" | |
- uses: astral-sh/setup-uv@v3 | |
with: | |
enable-cache: true | |
- name: Install Python dependencies | |
run: uv sync --extra stac-geoparquet | |
- name: Validate | |
run: uv run scripts/validate-stac-geoparquet |