# Forgejo Actions CI. # # This workflow mirrors the local quality gates exactly and is deliberately # fail-closed: a required check that cannot run because a tool is missing fails # the job rather than printing "skipping". A green job therefore means every # listed check actually executed. # # The Rust toolchain is pinned in `installer-rs/rust-toolchain.toml`. The runner # must provide either `rustup` (which installs the pin) or a cargo/rustfmt/clippy # toolchain; the preflight below fails clearly otherwise. # # If your runner uses different labels, change `runs-on` accordingly. name: ci on: push: branches: [main] pull_request: concurrency: group: ci-${{ github.ref }} cancel-in-progress: true jobs: quality-gates: runs-on: ubuntu-latest timeout-minutes: 60 steps: - uses: actions/checkout@v4 - name: Provision the pinned Rust toolchain run: | set -euo pipefail if command -v rustup >/dev/null 2>&1; then rustup show active-toolchain rustup component add rustfmt clippy rustup target add x86_64-unknown-linux-gnu elif command -v cargo >/dev/null 2>&1; then cargo --version cargo fmt --version cargo clippy --version else echo "ERROR: no Rust toolchain on this runner." >&2 echo "Install rustup (recommended, honours the pinned toolchain) or" >&2 echo "provide cargo with the rustfmt and clippy components, then retry." >&2 exit 1 fi # One command for the whole gate set, identical to local development. - name: Quality gates (fmt, clippy, tests, harness tests, builds) run: make ci