Skip to content

Commit

Permalink
Add a GitHub action for rustfmt
Browse files Browse the repository at this point in the history
Checks formatting against the default `cargo fmt` run.
  • Loading branch information
mitchmindtree committed Jan 20, 2020
1 parent aab0d90 commit cdd49ad
Showing 1 changed file with 17 additions and 0 deletions.
17 changes: 17 additions & 0 deletions .github/workflows/cpal.yml
Original file line number Diff line number Diff line change
Expand Up @@ -24,6 +24,23 @@ jobs:
token: ${{ secrets.GITHUB_TOKEN }}
args: --all --all-features

rustfmt-check:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v1
- name: Install stable
uses: actions-rs/toolchain@v1
with:
profile: minimal
toolchain: stable
override: true
components: rustfmt
- name: Run rustfmt
uses: actions-rs/cargo@v1
with:
command: fmt
args: --all --check

cargo-publish:

if: github.event_name == 'push' && github.ref == 'refs/heads/master'
Expand Down

0 comments on commit cdd49ad

Please sign in to comment.