Skip to content

Add GitHub Workflow for Rust Checks #2

Add GitHub Workflow for Rust Checks

Add GitHub Workflow for Rust Checks #2

Workflow file for this run

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: |
cd .. # Move up from the .github directory to find the workspace root
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: |
cd .. # Move up from the .github directory to find the workspace root
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: |
cd .. # Move up from the .github directory to find the workspace root
cargo clippy -- -D warnings