Actions: Build before formatting check

cargo fmt does not build the code, and running it in a fresh clone of
the codebase will fail because the protobuf code has not been generated.
This commit is contained in:
Jack Grigg 2019-09-18 17:08:58 +01:00
parent e9f94119bc
commit 274f860202
No known key found for this signature in database
GPG Key ID: 9E8255172BBF9898
1 changed files with 8 additions and 0 deletions

View File

@ -14,6 +14,14 @@ jobs:
toolchain: 1.37.0
override: true
# cargo fmt does not build the code, and running it in a fresh clone of
# the codebase will fail because the protobuf code has not been generated.
- name: cargo build
uses: actions-rs/cargo@v1
with:
command: build
args: --all
# Ensure all code has been formatted with rustfmt
- run: rustup component add rustfmt
- name: Check formatting