Fix typo #5
Workflow file for this run
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: Code Checks | |
on: | |
push: | |
branches: | |
- main | |
- ci-test | |
- add-basic-ci | |
jobs: | |
lint-checks: | |
name: Rust code checks | |
runs-on: ubuntu-latest | |
steps: | |
- name: Checkout | |
uses: actions/checkout@v4 | |
# Why are we installing two Rust toolchain versions below? | |
# answer: the rustfmt project is disfunctional, and chooses | |
# to make many of its useful features only available if you run | |
# a nightly toolchain (even though those features themselves are | |
# many years old now). The recommended workaround is to install | |
# both the toolchain version you want to use, and also the nightly | |
# toolchain, just to be able to run "cargo +nightly fmt" to get the | |
# full, very old set of rustfmt functionality. | |
- name: Install Nightly Rust Toolchain | |
uses: dtolnay/rust-toolchain@master | |
with: | |
toolchain: nightly | |
components: rustfmt | |
- name: Install Stable Rust Toolchain | |
uses: dtolnay/rust-toolchain@master | |
with: | |
toolchain: stable | |
components: clippy | |
- name: Run cargo fmt | |
# Note the hacky +nightly below | |
run: cargo +nightly fmt --all -- --check | |
- name: Run cargo clippy | |
run: cargo clippy --workspace --tests -- -D warnings |