name: CI
on:
push:
branches: [main, master]
paths-ignore:
- "website/**"
- ".github/workflows/docs.yml"
pull_request:
paths-ignore:
- "website/**"
- ".github/workflows/docs.yml"
workflow_dispatch:
concurrency:
group: ci-${{ github.workflow }}-${{ github.ref }}
cancel-in-progress: true
env:
CARGO_TERM_COLOR: always
jobs:
check:
name: check (${{ matrix.os }})
runs-on: ${{ matrix.os }}
strategy:
fail-fast: false
matrix:
os:
- ubuntu-latest
- macos-14
- windows-latest
steps:
- uses: actions/checkout@v7
- name: Setup Rust
uses: ./.github/actions/setup
with:
components: rustfmt,clippy
- name: cargo fmt
run: cargo fmt --all -- --check
- name: cargo check (workspace)
run: cargo check --workspace --all-targets
- name: cargo clippy (sdk)
run: cargo clippy -p goosefs-sdk --all-targets
- name: cargo clippy (python binding)
run: cargo clippy -p goosefs-python --all-targets
unit-rust:
name: unit-rust (${{ matrix.os }})
runs-on: ${{ matrix.os }}
strategy:
fail-fast: false
matrix:
os:
- ubuntu-latest
- macos-14
- windows-latest
steps:
- uses: actions/checkout@v7
- name: Setup Rust
uses: ./.github/actions/setup
with:
need-nextest: "true"
- name: Unit + hermetic integration tests
shell: bash
run: |
# Skips #[ignore] (cluster e2e + uring store tests that need
# host io_uring OPENAT, which GitHub Actions denies with EPERM).
cargo nextest run --workspace --no-fail-fast --lib --tests
- name: Doc tests
run: cargo test --workspace --doc --no-fail-fast
unit-python:
name: unit-python (${{ matrix.os }})
runs-on: ${{ matrix.os }}
strategy:
fail-fast: false
matrix:
os:
- ubuntu-latest
- macos-14
- windows-latest
python-version: ["3.11"]
steps:
- uses: actions/checkout@v7
- name: Setup Rust
uses: ./.github/actions/setup
- name: Install uv
uses: astral-sh/setup-uv@v7
with:
enable-cache: true
- name: Setup Python
uses: actions/setup-python@v7
with:
python-version: ${{ matrix.python-version }}
- name: Sync + build binding
shell: bash
working-directory: bindings/python
run: |
uv sync --all-extras --group dev --group test
uv run maturin develop --uv
- name: Ruff
working-directory: bindings/python
run: uv run ruff check python/goosefs tests examples
- name: Pytest (hermetic; no cluster)
working-directory: bindings/python
run: uv run --group test pytest -q
offline-benchmarks:
name: offline-benchmarks (${{ matrix.os }})
runs-on: ${{ matrix.os }}
strategy:
fail-fast: false
matrix:
os:
- ubuntu-latest
- macos-14
- windows-latest
steps:
- uses: actions/checkout@v7
- name: Setup Rust
uses: ./.github/actions/setup
- name: Offline Rust benchmarks
shell: bash
run: bash scripts/ci/run_rust_benchmarks.sh offline