Add workflow for cargo-fmt

This commit is contained in:
Ajeet D'Souza 2020-10-01 14:13:10 +05:30
parent 2eb02cbd76
commit 88fc3b2cfb
2 changed files with 27 additions and 2 deletions

View File

@ -6,12 +6,14 @@ on:
- "**/Cargo.toml"
- "**/Cargo.lock"
pull_request:
schedule:
- cron: "0 0 * * *"
jobs:
audit:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v2.3.3
- uses: actions-rs/audit-check@v1.2.0
- uses: actions/checkout@v2
- uses: actions-rs/audit-check@v1
with:
token: ${{ secrets.GITHUB_TOKEN }}

23
.github/workflows/cargo-fmt.yml vendored Normal file
View File

@ -0,0 +1,23 @@
name: cargo-fmt
on:
push:
paths:
- "**/*.rs"
pull_request:
jobs:
fmt:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v2
- uses: actions-rs/toolchain@v1
with:
profile: minimal
toolchain: stable
override: true
components: rustfmt
- uses: actions-rs/cargo@v1
with:
command: fmt
args: --all -- --check