Skip to content

fix(workflows): assign explicit permissions (#123) #166

fix(workflows): assign explicit permissions (#123)

fix(workflows): assign explicit permissions (#123) #166

name: lint-test-clippy
on:
push:
branches: [main]
pull_request:
branches: [main]
# No GITHUB_TOKEN permissions, as we don't use it.
permissions: {}
env:
CARGO_TERM_COLOR: always
jobs:
build:
runs-on: ubuntu-latest
env:
SCCACHE_GHA_ENABLED: "true"
RUSTC_WRAPPER: "sccache"
steps:
- uses: actions/checkout@v4
- uses: dtolnay/rust-toolchain@38b70195107dddab2c7bbd522bcf763bac00963b # stable
- name: sccache-cache
uses: mozilla-actions/sccache-action@9e326ebed976843c9932b3aa0e021c6f50310eb4 # v0.0.6
- name: Run fmt
run: cargo fmt -- --check
- name: Build
run: cargo build --verbose
- name: Run tests
run: cargo test --verbose --workspace --all-targets --no-fail-fast
- name: Run clippy
run: cargo clippy --all-features --workspace -- -Dwarnings