Files
Catty Steve a64e47d772
CI / ${{ matrix.crate }} (workshop-baker) (push) Failing after 28m8s
CI / ${{ matrix.crate }} (workshop-engine) (push) Failing after 1m27s
ci(github-actions): add workshop-engine to CI matrix strategy
Expand CI to run on workshop-engine crate alongside workshop-baker using
a matrix strategy to avoid job duplication.
2026-04-26 23:27:39 +08:00

63 lines
1.4 KiB
YAML

name: CI
on:
push:
branches: [ master, main ]
paths:
- 'workshop-baker/**'
- 'workshop-engine/**'
- '.github/workflows/ci.yml'
pull_request:
branches: [ master, main ]
paths:
- 'workshop-baker/**'
- 'workshop-engine/**'
- '.github/workflows/ci.yml'
env:
CARGO_TERM_COLOR: always
jobs:
ci:
name: ${{ matrix.crate }}
runs-on: ubuntu-latest
strategy:
fail-fast: false
matrix:
crate: [workshop-baker, workshop-engine]
defaults:
run:
working-directory: ./${{ matrix.crate }}
steps:
- uses: actions/checkout@v4
- name: Install Rust toolchain
uses: dtolnay/rust-toolchain@stable
with:
components: clippy, rustfmt
- name: Cache cargo dependencies
uses: actions/cache@v4
with:
path: |
~/.cargo/registry
~/.cargo/git
${{ matrix.crate }}/target
key: ${{ runner.os }}-cargo-${{ matrix.crate }}-${{ hashFiles(format('{0}/Cargo.lock', matrix.crate)) }}
restore-keys: |
${{ runner.os }}-cargo-${{ matrix.crate }}-
- name: Check compilation
run: cargo check --all-features
- name: Run tests
run: cargo test --all-features
- name: Check formatting
run: cargo fmt -- --check
- name: Run Clippy lints
run: cargo clippy --all-features -- -D warnings