Browse Source

github-actions: add rustfmt job

pull/1261/head
cynecx 5 years ago
parent
commit
dd6ea90890
  1. 18
      .github/workflows/workspace.yml

18
.github/workflows/workspace.yml

@ -9,6 +9,24 @@ on:
# - "**.md"
jobs:
fmt:
name: fmt
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v2
- name: Install Rust toolchain
run: cargo
- name: Install rustfmt
run: rustup component add rustfmt
# Check fmt
- name: "rustfmt --check"
# Workaround for rust-lang/cargo#7732
run: |
if ! rustfmt --check --edition 2018 $(find ./src -name '*.rs' -print); then
printf "Please run \`rustfmt --edition 2018 \$(find . -name '*.rs' -print)\` to fix rustfmt errors.\n" >&2
exit 1
fi
build:
name: Build
strategy:

Loading…
Cancel
Save