name: ci
on:
pull_request:
push:
branches:
- main
permissions:
contents: read
concurrency:
group: ci-${{ github.workflow }}-${{ github.ref }}
cancel-in-progress: true
jobs:
workflow-lint:
runs-on: ubuntu-latest
steps:
- name: Checkout
uses: actions/checkout@v4
- name: Install Go
uses: actions/setup-go@v5
with:
go-version: stable
- name: Lint GitHub Actions workflows
run: go run github.com/rhysd/actionlint/cmd/actionlint@latest .github/workflows/*.yml
validate:
needs: workflow-lint
runs-on: ubuntu-latest
steps:
- name: Checkout
uses: actions/checkout@v4
- name: Install Rust toolchain
uses: dtolnay/rust-toolchain@stable
with:
components: rustfmt, clippy
- name: Install cargo-nextest
uses: taiki-e/install-action@nextest
- name: Install Node.js
uses: actions/setup-node@v4
with:
node-version: 22
- name: Install pnpm
uses: pnpm/action-setup@v4
with:
version: 10.33.0
- name: Install pnpm workspace dependencies
run: pnpm install --frozen-lockfile
- name: Check formatting
run: cargo fmt --all --check
- name: Lint
run: cargo clippy --all-targets --all-features -- -D warnings
- name: Run tests
run: cargo nextest run
- name: Build release binary
run: cargo build --release
- name: Smoke test release binary
run: ./scripts/smoke-release-binary.sh ./target/release/creditlint
- name: Test npm wrapper
run: pnpm --filter creditlint test
- name: Validate OpenSpec
run: pnpm dlx @fission-ai/openspec validate --all