Skip to content

Commit

Permalink
Add clippy GitHub Action (#4)
Browse files Browse the repository at this point in the history
* Add clippy GitHub Action

* Fix up clippy workflow
  • Loading branch information
mattburgess authored Nov 14, 2020
1 parent 98cf504 commit 35cbfba
Show file tree
Hide file tree
Showing 2 changed files with 22 additions and 1 deletion.
21 changes: 21 additions & 0 deletions .github/workflows/clippy.yaml
Original file line number Diff line number Diff line change
@@ -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
2 changes: 1 addition & 1 deletion github.tf
Original file line number Diff line number Diff line change
Expand Up @@ -40,7 +40,7 @@ resource "github_branch_protection" "main" {

required_status_checks {
strict = true
contexts = ["Lint"]
contexts = ["Lint", "clippy"]
}

required_pull_request_reviews {
Expand Down

0 comments on commit 35cbfba

Please sign in to comment.