Skip to content

Commit

Permalink
ci: clippy dev: restore rust-toolchain file
Browse files Browse the repository at this point in the history
Previously, we removed the rust-toolchain file in ci and that used the toolchain action to install rustfmt
and run `cargo dev fmt`.

For testing lintcheck however, we need the rust-toolchain file and a pinned nightly version to build clippy.

Solution:
First remove the rust-toolchain file and check the formatting.
Then restore the toolchain file from the git repo and run the other tests
  • Loading branch information
matthiaskrgr committed Mar 2, 2021
1 parent 3c72f0b commit d2a9917
Showing 1 changed file with 8 additions and 3 deletions.
11 changes: 8 additions & 3 deletions .github/workflows/clippy_dev.yml
Original file line number Diff line number Diff line change
Expand Up @@ -25,6 +25,7 @@ jobs:
- name: Checkout
uses: actions/checkout@v2.3.3

# To test formatting, we need to temporarily disable the rust-toolchain file
- name: remove toolchain file
run: rm rust-toolchain

Expand All @@ -37,6 +38,13 @@ jobs:
components: rustfmt
default: true

- name: Test fmt
run: cargo dev fmt --check

# Restore the rust-toolchain-file
- name: Restore rust-toolchain-file
run: git checkout rust-toolchain

# Run
- name: Build
run: cargo build --features deny-warnings
Expand All @@ -48,9 +56,6 @@ jobs:
- name: Test update_lints
run: cargo dev update_lints --check

- name: Test fmt
run: cargo dev fmt --check

# Lintcheck
- name: build lintcheck
run: cargo build --features lintcheck,deny-warnings
Expand Down

0 comments on commit d2a9917

Please sign in to comment.