From bc3f55118617b5ffe1ea479c4f6d7d2167b86d36 Mon Sep 17 00:00:00 2001 From: Jon Gjengset Date: Sat, 17 Sep 2022 12:40:29 -0700 Subject: [PATCH] Add first style workflow --- github/workflows/style.yml | 36 ++++++++++++++++++++++++++++++++++++ 1 file changed, 36 insertions(+) create mode 100644 github/workflows/style.yml diff --git a/github/workflows/style.yml b/github/workflows/style.yml new file mode 100644 index 0000000..74a877c --- /dev/null +++ b/github/workflows/style.yml @@ -0,0 +1,36 @@ +on: + push: + branches: [main] + pull_request: +name: lint +jobs: + style: + runs-on: ubuntu-latest + name: ${{ matrix.toolchain }} + strategy: + fail-fast: false + matrix: + toolchain: [stable, beta] + steps: + - uses: actions-rs/toolchain@v1 + with: + profile: minimal + toolchain: ${{ matrix.toolchain }} + components: rustfmt, clippy + - uses: actions/checkout@v2 + - name: cargo fmt --check + uses: actions-rs/cargo@v1 + with: + command: fmt + args: --check + - name: cargo doc + uses: actions-rs/cargo@v1 + if: always() + with: + command: doc + args: --no-deps --all-features + - name: cargo clippy + uses: actions-rs/clippy-check@v1 + if: always() + with: + token: ${{ secrets.GITHUB_TOKEN }}