name: ๐งช Test
on:
pull_request:
workflow_call:
permissions:
contents: read
jobs:
fmt:
name: ๐จ Check formatting
runs-on: ubuntu-latest
steps:
- name: ๐ Checkout
uses: actions/checkout@v6
- name: ๐งฐ Install rustfmt
run: rustup component add rustfmt
- name: ๐จ Cargo fmt
run: cargo fmt --all -- --check
test:
name: ๐งช ${{ matrix.task }} (${{ matrix.profile }})
runs-on: ubuntu-latest
strategy:
fail-fast: false
matrix:
profile:
- debug
- release
task:
- clippy
- test
env:
RUSTFLAGS: -D warnings
steps:
- name: ๐ Checkout
uses: actions/checkout@v6
- name: ๐ง Install cargo-hack
uses: taiki-e/install-action@v2
with:
tool: cargo-hack
- name: ๐ฆ Cargo ${{ matrix.task }} (feature powerset)
run: |
cargo hack ${{ matrix.task }} --feature-powerset ${{ matrix.profile == 'release' && '--release' || '' }}