Skip to content

Commit 553e1ab

Browse files
authored
Merge pull request #13 from github/aibaars/improve-workflow
Check formatting and cache builds
2 parents 2989948 + 7e6c30b commit 553e1ab

File tree

1 file changed

+12
-0
lines changed

1 file changed

+12
-0
lines changed

.github/workflows/build.yml

Lines changed: 12 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -20,6 +20,18 @@ jobs:
2020

2121
steps:
2222
- uses: actions/checkout@v2
23+
- name: Install rustfmt
24+
run: rustup component add rustfmt --toolchain stable-x86_64-apple-darwin
25+
if: ${{ matrix.os == 'macos-latest' }}
26+
- name: Check formatting
27+
run: cargo fmt --all -- --check
28+
- uses: actions/cache@v2
29+
with:
30+
path: |
31+
~/.cargo/registry
32+
~/.cargo/git
33+
target
34+
key: ${{ runner.os }}-cargo-${{ hashFiles('**/Cargo.lock') }}
2335
- name: Build
2436
run: cargo build --verbose
2537
- name: Run tests

0 commit comments

Comments
 (0)