name: Rust
on:
push:
branches: [ "main" ]
pull_request:
env:
CARGO_TERM_COLOR: always
concurrency:
group: ${{ github.workflow }}-${{ github.event.pull_request.number || github.ref }}
cancel-in-progress: true
jobs:
rustfmt:
uses: ./.github/workflows/rustfmt.yml
build:
runs-on: ubuntu-latest
needs: [rustfmt]
env:
SCCACHE_GHA_ENABLED: "true"
RUSTC_WRAPPER: "sccache"
steps:
- uses: actions/checkout@v4
- uses: mozilla-actions/sccache-action@v0.0.5
- name: Run clippy
run: cargo clippy --verbose
- name: Run clippy (all features)
run: cargo clippy --all-features --verbose
- name: Build
run: cargo build --verbose
- name: Run tests
run: cargo test --verbose
- name: Run tests (all features)
run: cargo test --all-features --verbose