name: CI
on:
pull_request:
merge_group: {}
workflow_dispatch:
concurrency:
group: ci-${{ github.ref }}
cancel-in-progress: ${{ github.ref != 'refs/heads/main' }}
permissions:
contents: read
env:
CARGO_INCREMENTAL: "0"
RUSTFLAGS: "-D warnings"
jobs:
CI:
name: CI
runs-on: ubuntu-latest
timeout-minutes: 20
steps:
- uses: step-security/harden-runner@1d88384fd173af6ecb012dfd0264a306b711241a with:
egress-policy: audit
- uses: actions/checkout@3d3c42e5aac5ba805825da76410c181273ba90b1 with:
persist-credentials: false
- name: Release notes script
run: python3 -m unittest scripts/test_apply_release_notes.py
- uses: ./.github/actions/setup-rust
with:
components: rustfmt, clippy
- uses: taiki-e/install-action@ab49d3c64680143e184118bed66a46419fc15519 with:
tool: cargo-deny@0.20.2
- run: cargo fmt --check
- run: cargo clippy --locked --all-targets -- -D warnings
- run: cargo test --locked --all-targets
- run: cargo test --locked --doc
- run: cargo deny check
windows:
name: CI Windows
runs-on: windows-latest
timeout-minutes: 30
steps:
- uses: actions/checkout@3d3c42e5aac5ba805825da76410c181273ba90b1 with:
persist-credentials: false
- uses: ./.github/actions/setup-rust
- run: cargo test --locked --all-targets
- run: cargo test --locked --doc
macos:
name: CI macOS
if: github.event_name != 'pull_request' || !startsWith(github.head_ref, 'release-please')
runs-on: macos-latest
timeout-minutes: 30
steps:
- uses: step-security/harden-runner@1d88384fd173af6ecb012dfd0264a306b711241a with:
egress-policy: audit
- uses: actions/checkout@3d3c42e5aac5ba805825da76410c181273ba90b1 with:
persist-credentials: false
- uses: ./.github/actions/setup-rust
- run: cargo test --locked --all-targets
- run: cargo test --locked --doc
msrv:
name: MSRV
if: github.event_name != 'pull_request' || !startsWith(github.head_ref, 'release-please')
runs-on: ubuntu-latest
timeout-minutes: 20
steps:
- uses: step-security/harden-runner@1d88384fd173af6ecb012dfd0264a306b711241a with:
egress-policy: audit
- uses: actions/checkout@3d3c42e5aac5ba805825da76410c181273ba90b1 with:
persist-credentials: false
- uses: ./.github/actions/setup-rust
with:
toolchain: "1.95"
- run: cargo check --locked --all-targets