Skip to content

Commit 35cbfba

Browse files
authored
Add clippy GitHub Action (#4)
* Add clippy GitHub Action * Fix up clippy workflow
1 parent 98cf504 commit 35cbfba

File tree

2 files changed

+22
-1
lines changed

2 files changed

+22
-1
lines changed

.github/workflows/clippy.yaml

Lines changed: 21 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,21 @@
1+
---
2+
name: clippy
3+
4+
on:
5+
pull_request:
6+
branches: [main]
7+
8+
jobs:
9+
build:
10+
name: clippy
11+
runs-on: ubuntu-latest
12+
steps:
13+
- name: Checkout code
14+
uses: actions/checkout@v1
15+
- name: Add clippy component
16+
run: rustup component add clippy
17+
- name: Run clippy
18+
uses: actions-rs/clippy-check@v1
19+
with:
20+
token: ${{ secrets.GITHUB_TOKEN }}
21+
args: --all-features

github.tf

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -40,7 +40,7 @@ resource "github_branch_protection" "main" {
4040

4141
required_status_checks {
4242
strict = true
43-
contexts = ["Lint"]
43+
contexts = ["Lint", "clippy"]
4444
}
4545

4646
required_pull_request_reviews {

0 commit comments

Comments
 (0)