From 35cbfba4606a0765bd2ff2ac71b1241cffbcc654 Mon Sep 17 00:00:00 2001 From: Matthew Burgess <549318+mattburgess@users.noreply.github.com> Date: Sat, 14 Nov 2020 11:15:44 +0000 Subject: [PATCH] Add clippy GitHub Action (#4) * Add clippy GitHub Action * Fix up clippy workflow --- .github/workflows/clippy.yaml | 21 +++++++++++++++++++++ github.tf | 2 +- 2 files changed, 22 insertions(+), 1 deletion(-) create mode 100644 .github/workflows/clippy.yaml diff --git a/.github/workflows/clippy.yaml b/.github/workflows/clippy.yaml new file mode 100644 index 0000000..1a38ce5 --- /dev/null +++ b/.github/workflows/clippy.yaml @@ -0,0 +1,21 @@ +--- +name: clippy + +on: + pull_request: + branches: [main] + +jobs: + build: + name: clippy + runs-on: ubuntu-latest + steps: + - name: Checkout code + uses: actions/checkout@v1 + - name: Add clippy component + run: rustup component add clippy + - name: Run clippy + uses: actions-rs/clippy-check@v1 + with: + token: ${{ secrets.GITHUB_TOKEN }} + args: --all-features diff --git a/github.tf b/github.tf index 92d56de..5aef5a0 100644 --- a/github.tf +++ b/github.tf @@ -40,7 +40,7 @@ resource "github_branch_protection" "main" { required_status_checks { strict = true - contexts = ["Lint"] + contexts = ["Lint", "clippy"] } required_pull_request_reviews {