CI improvement #574
Workflow file for this run
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
name: CI | |
on: | |
push: | |
branches: | |
- 'main' | |
pull_request: | |
branches: | |
- '*' | |
env: | |
CARGO_TERM_COLOR: always | |
RUSTFLAGS: '-D warnings' | |
RUST_BACKTRACE: 1 | |
jobs: | |
rustfmt: | |
name: Rust format | |
runs-on: ubuntu-latest | |
steps: | |
- name: Install Rust toolchain | |
uses: actions-rs/toolchain@v1 | |
with: | |
profile: minimal | |
toolchain: stable | |
components: rustfmt | |
- name: Checkout repo | |
uses: actions/checkout@v4 | |
- name: Cargo format | |
run: cargo fmt --all -- --check | |
build: | |
runs-on: ubuntu-latest | |
steps: | |
- uses: actions/checkout@v3 | |
- name: Install Rust toolchain | |
uses: actions-rs/toolchain@v1 | |
with: | |
profile: minimal | |
toolchain: stable | |
- name: Check Build | |
run: | | |
cargo build --workspace --release | |
clippy: | |
runs-on: ubuntu-latest | |
steps: | |
- uses: actions/checkout@v3 | |
- name: Install Rust toolchain | |
uses: actions-rs/toolchain@v1 | |
with: | |
profile: minimal | |
toolchain: stable | |
components: clippy | |
- name: Cargo clippy | |
run: | |
cargo clippy --workspace --all-targets | |
test: | |
runs-on: ubuntu-latest | |
steps: | |
- uses: actions/checkout@v3 | |
- name: Install Rust toolchain | |
uses: actions-rs/toolchain@v1 | |
with: | |
profile: minimal | |
toolchain: stable | |
- name: Run tests | |
run: cargo test --workspace --release |