name: CI
on:
concurrency:
group: ${{ github.repository }}-${{ github.event.number || github.head_ref || github.sha }}-${{ github.workflow }}
cancel-in-progress: true
jobs:
check:
runs-on: ubuntu-latest
strategy:
matrix:
rust:
steps:
- uses: actions/checkout@v3
- uses: actions-rs/toolchain@v1
with:
profile: minimal
toolchain: ${{ matrix.rust }}
override: true
components: rustfmt, clippy
- name: Check
run: |
cargo fmt --all -- --check
cargo clippy -- -D warnings
cargo check
- name: Unittest
run: |
cargo test --lib