Skip to content

Commit

Permalink
[NRO-6] Add GitHub workflow for Rust checks: testing, fmt, clippy
Browse files Browse the repository at this point in the history
Establishes a CI workflow for Rust. It includes running tests, enforcing code
formatting with `cargo fmt`, and linting with `clippy`. This ensures all pushed
code and PRs against main comply with these quality checks.
  • Loading branch information
Nero Alpha committed Apr 18, 2024
1 parent 3eceb33 commit f7343d3
Showing 1 changed file with 53 additions and 0 deletions.
53 changes: 53 additions & 0 deletions .github/workflows/rust_checks.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,53 @@
name: Rust Checks

on:
push:
branches:
- main
pull_request:
branches:
- main

jobs:
test:
name: Run tests
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v2
- name: Install Rust
uses: actions-rs/toolchain@v1
with:
profile: minimal
toolchain: stable
override: true
- name: Run tests
run: cargo test --all

check_format:
name: Check format
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v2
- name: Install Rust
uses: actions-rs/toolchain@v1
with:
profile: minimal
toolchain: stable
override: true
- name: Check format
run: cargo fmt -- --check

check_clippy:
name: Check clippy
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v2
- name: Install Rust
uses: actions-rs/toolchain@v1
with:
profile: minimal
toolchain: stable
components: clippy
override: true
- name: Run Clippy
run: cargo clippy -- -D warnings

0 comments on commit f7343d3

Please sign in to comment.