name: test
on:
workflow_call:
inputs:
os:
description: Runner image to run on.
required: true
type: string
container:
description: Optional container image (used for Fedora).
required: false
type: string
default: ""
env:
CARGO_TERM_COLOR: always
jobs:
test:
runs-on: ${{ inputs.os }}
container: ${{ inputs.container }}
steps:
- name: Install build tools (Fedora)
if: inputs.container != ''
run: dnf install -y gcc git tar
- uses: actions/checkout@v5
- uses: dtolnay/rust-toolchain@stable
- uses: Swatinem/rust-cache@v2
- run: cargo build --locked --verbose
- run: cargo test --locked --verbose