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 {