Skip to content

chore(ci): add ci workflows #1

chore(ci): add ci workflows

chore(ci): add ci workflows #1

Workflow file for this run

name: ci
on:
pull_request:
push:
branches:
- 'main'
concurrency:
group: ${{ github.workflow }}-${{ github.head_ref || github.run_id }}
cancel-in-progress: true
env:
CARGO_TERM_COLOR: always
RUST_BACKTRACE: full
RUSTFLAGS: '-D warnings'
jobs:
test:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@692973e3d937129bcbf40652eb9f2f61becf3332 # v4
- name: Setup Rust toolchain
uses: dtolnay/rust-toolchain@stable
with:
toolchain: stable
components: clippy
- name: Cache Cargo build files
uses: Leafwing-Studios/cargo-cache@c7e8aa40ae2c975774d3bd766beb92927cfd7771 # v1
- run: cargo check
- run: cargo clippy -- -Dwarnings --force-warn deprecated --force-warn dead-code
- name: Unit tests
run: cargo test --lib
format:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@692973e3d937129bcbf40652eb9f2f61becf3332 # v4
- name: Setup Rust toolchain
uses: dtolnay/rust-toolchain@nightly
with:
toolchain: nightly
components: rustfmt
- run: cargo +nightly fmt --all -- --check