Check formatting and cache builds

This commit is contained in:
Arthur Baars
2020-10-27 19:11:05 +01:00
parent 29899485c7
commit 7e6c30b121

View File

@@ -20,6 +20,18 @@ jobs:
steps:
- uses: actions/checkout@v2
- name: Install rustfmt
run: rustup component add rustfmt --toolchain stable-x86_64-apple-darwin
if: ${{ matrix.os == 'macos-latest' }}
- name: Check formatting
run: cargo fmt --all -- --check
- uses: actions/cache@v2
with:
path: |
~/.cargo/registry
~/.cargo/git
target
key: ${{ runner.os }}-cargo-${{ hashFiles('**/Cargo.lock') }}
- name: Build
run: cargo build --verbose
- name: Run tests