Skip to content

Clarify additional provider archive input #20

Clarify additional provider archive input

Clarify additional provider archive input #20

Workflow file for this run

name: CI
on:
pull_request:
push:
branches:
- main
permissions:
contents: read
jobs:
baseline:
runs-on: ubuntu-latest
steps:
- name: Check out repository
uses: actions/checkout@v7
- name: Read supported specification revision
id: specification
shell: bash
run: |
grep -Eq '^[0-9a-f]{40}$' tests/specification-revision
revision=$(tr -d '\n' < tests/specification-revision)
printf 'revision=%s\n' "$revision" >> "$GITHUB_OUTPUT"
- name: Check out canonical specification
uses: actions/checkout@v7
with:
repository: stack-sh/specification
ref: ${{ steps.specification.outputs.revision }}
path: .stack-specification
- name: Check whitespace
run: git diff --check "$(git hash-object -t tree /dev/null)" HEAD
- name: Validate provider catalogs
run: node scripts/validate-provider-catalogs.mjs
- name: Install latest stable Rust toolchain
run: rustup toolchain install stable --profile minimal --component clippy,rustfmt,llvm-tools-preview
- name: Check formatting
run: cargo +stable fmt --check
- name: Run tests
run: cargo +stable test --locked
- name: Run canonical formatter suite
env:
STACK_SPECIFICATION_DIR: ${{ github.workspace }}/.stack-specification
run: cargo +stable test --features conformance --test formatter-conformance --locked
- name: Run Clippy
run: cargo +stable clippy --all-targets --all-features --locked -- -D warnings
- name: Build documentation
env:
RUSTDOCFLAGS: -D warnings
run: cargo +stable doc --no-deps --locked
- name: Install cargo-llvm-cov
uses: taiki-e/install-action@e67fa11c4b9316fa714ddf0abed07a0c3143b95b # v2.87.4
with:
tool: cargo-llvm-cov@0.9.0
fallback: none
- name: Enforce test coverage
env:
STACK_SPECIFICATION_DIR: ${{ github.workspace }}/.stack-specification
run: cargo +stable llvm-cov --all-features --locked --fail-under-lines 90 --fail-under-functions 95 --fail-under-regions 90
- name: Build release binary
run: cargo +stable build --release --locked
- name: Validate rendered SVG
run: python3 scripts/validate-render.py
- name: Smoke test command metadata
run: |
./target/release/stack --help
./target/release/stack --version
./target/release/stack check --help
./target/release/stack fmt --help
./target/release/stack render --help
./target/release/stack icons --help
./target/release/stack icons list
./target/release/stack icons list aws s3
./target/release/stack icons import --help
- name: Verify repository files
run: |
test -s README.md
test -s AGENTS.md
test -s LICENSE
test -s NOTICE
test -s THIRD_PARTY_LICENSES.md
test -s CONTRIBUTING.md
test -s SECURITY.md
test -s docs/publication-audit.md
test -s docs/provider-icon-import.md
test -s Cargo.toml
test -s Cargo.lock
test -s src/main.rs
test -s src/provider.rs
test -s src/provider_catalog.rs
test -s catalogs/aws.json
test -s catalogs/gcp.json
test -s catalogs/azure.json
test -s catalogs/simple-icons.json
test -s scripts/generate-provider-catalogs.mjs
test -s scripts/validate-provider-catalogs.mjs
test -s tests/specification-revision
test -s tests/fixtures/render.stack
msrv:
name: Minimum supported Rust
runs-on: ubuntu-latest
steps:
- name: Check out repository
uses: actions/checkout@v7
- name: Install Rust 1.85
run: rustup toolchain install 1.85.0 --profile minimal --component clippy
- name: Run tests
run: cargo +1.85.0 test --locked
- name: Run Clippy
run: cargo +1.85.0 clippy --all-targets --all-features --locked -- -D warnings