Skip to content

Closing conformance level 1 work (#3) #8

Closing conformance level 1 work (#3)

Closing conformance level 1 work (#3) #8

Workflow file for this run

name: CI
# This workflow runs tests, formatting checks, and the fspec tool.
#
# To set up branch protection for master/main (require reviews and passing CI):
# 1. Go to your repository on GitHub
# 2. Navigate to Settings > Branches
# 3. Click "Add branch protection rule" or edit existing rule for master/main
# 4. Enable the following options:
# - "Require a pull request before merging"
# - Enable "Require approvals" (set to 1 or more)
# - Optionally enable "Dismiss stale pull request approvals when new commits are pushed"
# - "Require status checks to pass before merging"
# - Select "Test Suite" as the required status check
# - Optionally: "Require conversation resolution before merging"
# - Optionally: "Do not allow bypassing the above settings" (prevents admins from bypassing)
# 5. Click "Create" or "Save changes"
#
# Note: Branch protection cannot be configured via files alone - it requires
# repository settings access. However, this workflow will fail if tests don't pass,
# which effectively enforces the requirement.
on:
push:
branches: [ master, main ]
pull_request:
branches: [ master, main ]
workflow_dispatch: # Allows manual triggering from GitHub Actions UI
env:
CARGO_TERM_COLOR: always
jobs:
test:
name: Test Suite
runs-on: ubuntu-24.04
steps:
- uses: actions/checkout@v4
- name: Install Rust
uses: dtolnay/rust-toolchain@stable
with:
components: rustfmt
- name: Cache cargo registry
uses: actions/cache@v4
with:
path: |
${{ runner.home }}/.cargo/bin/
${{ runner.home }}/.cargo/registry/index/
${{ runner.home }}/.cargo/registry/cache/
${{ runner.home }}/.cargo/git/db/
target/
key: ${{ runner.os }}-cargo-${{ hashFiles('**/Cargo.lock') }}
restore-keys: |
${{ runner.os }}-cargo-
- name: Check formatting
run: cargo fmt --all -- --check
- name: Run tests
run: cargo test --workspace --all-features
- name: Run fspec tool
run: cargo run
working-directory: ${{ github.workspace }}