name: CI
on:
pull_request:
push:
branches:
- main
tags:
- "v*"
permissions:
contents: read
jobs:
test:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v5
- uses: dtolnay/rust-toolchain@stable
- name: Format
run: cargo fmt --check
- name: Test
run: cargo test --locked
- name: Clippy
run: cargo clippy --locked --all-targets --all-features -- -D warnings
- name: Docs
run: cargo doc --locked --no-deps
- name: Package
run: cargo package --locked
- name: Smoke eval
run: cargo run --locked -- eval --expr "contains(github.event.issue.labels.*.name, 'bug')" --github-context examples/github-context.json --format json --output target/eval-receipt.json
- name: Smoke template
run: cargo run --locked -- template --template 'deploy-${{ github.ref_name }}' --github-context examples/github-context.json --format markdown --output target/template-receipt.md
- name: Smoke hashFiles
run: cargo run --locked -- eval --expr "hashFiles('Cargo.lock') != ''" --workspace .