ci(github-actions): add workshop-engine to CI matrix strategy
CI / ${{ matrix.crate }} (workshop-baker) (push) Failing after 28m8s
CI / ${{ matrix.crate }} (workshop-engine) (push) Failing after 1m27s

Expand CI to run on workshop-engine crate alongside workshop-baker using
a matrix strategy to avoid job duplication.
This commit is contained in:
Catty Steve
2026-04-26 23:27:39 +08:00
parent 8fd807f174
commit a64e47d772
+20 -14
View File
@@ -5,27 +5,33 @@ on:
branches: [ master, main ] branches: [ master, main ]
paths: paths:
- 'workshop-baker/**' - 'workshop-baker/**'
- 'workshop-engine/**'
- '.github/workflows/ci.yml' - '.github/workflows/ci.yml'
pull_request: pull_request:
branches: [ master, main ] branches: [ master, main ]
paths: paths:
- 'workshop-baker/**' - 'workshop-baker/**'
- 'workshop-engine/**'
- '.github/workflows/ci.yml' - '.github/workflows/ci.yml'
env: env:
CARGO_TERM_COLOR: always CARGO_TERM_COLOR: always
jobs: jobs:
check-and-lint: ci:
name: Check & Lint name: ${{ matrix.crate }}
runs-on: ubuntu-latest runs-on: ubuntu-latest
strategy:
fail-fast: false
matrix:
crate: [workshop-baker, workshop-engine]
defaults: defaults:
run: run:
working-directory: ./workshop-baker working-directory: ./${{ matrix.crate }}
steps: steps:
- name: Checkout code - uses: actions/checkout@v4
uses: actions/checkout@v4
- name: Install Rust toolchain - name: Install Rust toolchain
uses: dtolnay/rust-toolchain@stable uses: dtolnay/rust-toolchain@stable
@@ -38,19 +44,19 @@ jobs:
path: | path: |
~/.cargo/registry ~/.cargo/registry
~/.cargo/git ~/.cargo/git
target ${{ matrix.crate }}/target
key: ${{ runner.os }}-cargo-${{ hashFiles('**/Cargo.lock') }} key: ${{ runner.os }}-cargo-${{ matrix.crate }}-${{ hashFiles(format('{0}/Cargo.lock', matrix.crate)) }}
restore-keys: | restore-keys: |
${{ runner.os }}-cargo- ${{ runner.os }}-cargo-${{ matrix.crate }}-
- name: Check compilation
run: cargo check --all-features
- name: Run tests
run: cargo test --all-features
- name: Check formatting - name: Check formatting
run: cargo fmt -- --check run: cargo fmt -- --check
- name: Check code (cargo check)
run: cargo check --all-features
- name: Run Clippy lints - name: Run Clippy lints
run: cargo clippy --all-features -- -D warnings run: cargo clippy --all-features -- -D warnings
- name: Run tests
run: cargo test --all-features