Skip to content

Commit

Permalink
Adds a GitHub action that runs cargo check and cargo clippy on in…
Browse files Browse the repository at this point in the history
…coming 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
  • Loading branch information
ElykDeer committed Apr 16, 2024
1 parent 3e19f70 commit f408eb3
Showing 1 changed file with 38 additions and 0 deletions.
38 changes: 38 additions & 0 deletions .github/workflows/rust.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,38 @@
name: Rust PR Checks

on:
pull_request:
paths:
- 'rust/**'

jobs:
build_and_lint:
name: cargo check & cargo clippy
runs-on: ubuntu-latest

steps:
- name: Checkout code
uses: actions/checkout@v3

- name: Install Clang
run: |
sudo apt update
sudo apt install clang -y
- name: Install Rust
uses: actions-rs/toolchain@v1
with:
toolchain: 1.77.0
profile: minimal
override: true
components: clippy

- name: cargo check
working-directory: ./rust
run: cargo check --workspace

- name: cargo clippy
working-directory: ./rust
run: cargo clippy -- -D warnings
continue-on-error: true
# If this step fails, it will warn (?)

0 comments on commit f408eb3

Please sign in to comment.