name: CI
on:
push:
branches: [main]
pull_request:
workflow_dispatch:
concurrency:
group: ci-${{ github.ref }}
cancel-in-progress: true
jobs:
check:
runs-on: ubuntu-latest
name: Compile & Test
steps:
- name: Checkout
uses: actions/checkout@v4
- name: Configure git for private deps
run: git config --global url."https://x-access-token:${{ secrets.GHCR_TOKEN }}@github.com/".insteadOf "https://github.com/"
- name: Install Rust toolchain
uses: dtolnay/rust-toolchain@stable
- name: Rust cache
uses: Swatinem/rust-cache@v2
- name: Compile check
run: cargo check --workspace
- name: Run tests
run: cargo test --workspace --lib
- name: Clippy
run: cargo clippy --workspace