Skip to content

fxrstor

fxrstor #74

Workflow file for this run

name: Rust CI
on:
pull_request:
branches: [ "main" ]
env:
CARGO_TERM_COLOR: always
jobs:
check:
name: Check
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v4
- name: Install Rust toolchain
uses: dtolnay/rust-toolchain@stable
with:
components: rustfmt, clippy
- name: Cache dependencies
uses: actions/cache@v3
with:
path: |
~/.cargo/registry
~/.cargo/git
target
key: ${{ runner.os }}-cargo-${{ hashFiles('**/Cargo.lock') }}
# TODO: fail pipeline if formatting fails
- name: Check formatting
run: cargo fmt --all -- --check || true
# TODO: fail pipeline if clippy fails
- name: Run clippy
run: cargo clippy -- -D warnings || true
- name: Build
run: cargo build --verbose
- name: Run tests
run: cargo test --verbose