Skip to content

Commit f408eb3

Browse files
committed
Adds a GitHub action that runs cargo check and cargo clippy on incoming PRs that modify anything in the ./rust folder
This will make it a lot easier to approve PRs that don't have breaking API changes
1 parent 3e19f70 commit f408eb3

File tree

1 file changed

+38
-0
lines changed

1 file changed

+38
-0
lines changed

.github/workflows/rust.yml

Lines changed: 38 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,38 @@
1+
name: Rust PR Checks
2+
3+
on:
4+
pull_request:
5+
paths:
6+
- 'rust/**'
7+
8+
jobs:
9+
build_and_lint:
10+
name: cargo check & cargo clippy
11+
runs-on: ubuntu-latest
12+
13+
steps:
14+
- name: Checkout code
15+
uses: actions/checkout@v3
16+
17+
- name: Install Clang
18+
run: |
19+
sudo apt update
20+
sudo apt install clang -y
21+
22+
- name: Install Rust
23+
uses: actions-rs/toolchain@v1
24+
with:
25+
toolchain: 1.77.0
26+
profile: minimal
27+
override: true
28+
components: clippy
29+
30+
- name: cargo check
31+
working-directory: ./rust
32+
run: cargo check --workspace
33+
34+
- name: cargo clippy
35+
working-directory: ./rust
36+
run: cargo clippy -- -D warnings
37+
continue-on-error: true
38+
# If this step fails, it will warn (?)

0 commit comments

Comments
 (0)