Skip to content

Commit

Permalink
Add format checks to workflow (#18)
Browse files Browse the repository at this point in the history
  • Loading branch information
JustusAdam authored Jul 26, 2023
1 parent 241704b commit e2d6d14
Show file tree
Hide file tree
Showing 2 changed files with 15 additions and 1 deletion.
14 changes: 14 additions & 0 deletions .github/workflows/rust.yml
Original file line number Diff line number Diff line change
Expand Up @@ -76,3 +76,17 @@ jobs:
raco pkg install --auto || raco setup forge
- name: Run Tests
run: cargo test --test external_annotation_tests
format-check:
name: Format Control
runs-on: ubuntu-latest

steps:
- uses: actions/checkout@v3
# just triggers rustup to download the toolchain
- name: Cache Toolchain
uses: actions/cache@v3
with:
path: ~/.rustup
key: ${{ runner.os }}-rust-toolchain-${{ hashFiles('rust-toolchain.toml') }}
- name: Perform Check
run: cargo fmt --check
2 changes: 1 addition & 1 deletion rust-toolchain.toml
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
[toolchain]
channel = "nightly-2023-04-12"
components = ["rustc-dev", "rust-src"]
components = ["rustc-dev", "rust-src", "rustfmt"]

# You are probably looking at this because you got an error that the toolchain
# that was configured does not exist,
Expand Down

0 comments on commit e2d6d14

Please sign in to comment.