Update check workflow #53
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
name: Check | |
on: | |
push: | |
branches: | |
- main | |
- workflow_check | |
pull_request: | |
branches: | |
- main | |
env: | |
# Emit backtraces on panics. | |
RUST_BACKTRACE: full | |
# Enable colors in cargo output. | |
CARGO_TERM_COLOR: always | |
# Use sparse index if supported | |
# (probably no longer required, but cargo-culted) | |
CARGO_REGISTRIES_CRATES_IO_PROTOCOL: sparse | |
jobs: | |
check: | |
name: Check | |
runs-on: ubuntu-latest | |
timeout-minutes: 5 | |
steps: | |
- name: Checkout repository | |
uses: actions/checkout@v4 | |
- name: Install toolchain | |
run: rustup show | |
shell: bash | |
- name: Run cargo fmt | |
run: cargo fmt --all -- --check | |
shell: bash | |
- name: Run cargo check | |
run: RUSTFLAGS="-D warnings" cargo check --workspace --locked --all-targets | |
shell: bash | |
- name: Run cargo test | |
run: cargo test --workspace --locked --all-targets --no-fail-fast | |
shell: bash | |
- name: Run cargo clippy | |
run: cargo clippy --workspace --locked --all-targets -- -Dwarnings | |
shell: bash |