Skip to content

fma: (place:tissue) render convergence + /fma-body cockpit + 1M SoA scan PoC #62

fma: (place:tissue) render convergence + /fma-body cockpit + 1M SoA scan PoC

fma: (place:tissue) render convergence + /fma-body cockpit + 1M SoA scan PoC #62

Workflow file for this run

name: Test Suite
on:
workflow_dispatch:
push:
branches:
- main
- kyoto
pull_request:
branches:
- main
- kyoto
concurrency:
group: ${{ github.workflow }}-${{ github.ref == 'refs/heads/main' && github.run_id || github.event.pull_request.number || github.ref }}
cancel-in-progress: true
env:
PANDOC_VERSION: "3.8.3"
jobs:
test-suite:
strategy:
fail-fast: false
matrix:
os: [ubuntu-latest, macos-latest]
runs-on: ${{ matrix.os }}
name: Run test suite
if: github.repository == 'quarto-dev/q2'
steps:
- name: Checkout Repo
uses: actions/checkout@v6
# Fix mtimes IMMEDIATELY after checkout, before anything else
- name: Restore file modification times
shell: bash
run: |
git ls-files | while read file; do
time=$(git log -1 --format='@%ct' -- "$file" 2>/dev/null || echo '@0')
[ "$time" != "@0" ] && touch -d "$time" "$file" 2>/dev/null || true
done
- name: Set up Homebrew
if: runner.os == 'macOS'
id: set-up-homebrew
uses: Homebrew/actions/setup-homebrew@main
# Consistent Rust setup for both platforms
- name: Set up Rust nightly
uses: dtolnay/rust-toolchain@nightly
- name: Output rust version
shell: bash
run: rustup --version
# Cache Rust AFTER toolchain is set up
- name: Cache Rust dependencies
uses: Swatinem/rust-cache@v2
with:
cache-on-failure: true
# cache-bin: false avoids clobbering the freshly-installed
# ~/.cargo/bin/{cargo,rustup,...} with stale proxies from a
# previous run. Intermittently broke macOS CI on 2026-05-14
# with `cargo xtask … → rustup-init: unexpected argument`.
# cargo-nextest / cargo-insta re-install via taiki-e/install-
# action's prebuilts each run, which is cheap (~1-2s).
cache-bin: false
shared-key: "rust-test-suite"
# Cache cargo-nextest and insta separately to avoid reinstalling
- name: Install nextest
uses: taiki-e/install-action@nextest
- name: Install cargo-insta
uses: taiki-e/install-action@v2
with:
tool: cargo-insta
# Pandoc setup (pinned to match Quarto 1.9)
- name: Set up Pandoc (Linux)
if: runner.os == 'Linux'
run: |
curl -LO "https://github.com/jgm/pandoc/releases/download/${PANDOC_VERSION}/pandoc-${PANDOC_VERSION}-1-amd64.deb"
sudo dpkg -i "pandoc-${PANDOC_VERSION}-1-amd64.deb"
shell: bash
- name: Set up Pandoc (macOS)
if: runner.os == 'macOS'
run: |
curl -LO "https://github.com/jgm/pandoc/releases/download/${PANDOC_VERSION}/pandoc-${PANDOC_VERSION}-arm64-macOS.pkg"
sudo installer -pkg "pandoc-${PANDOC_VERSION}-arm64-macOS.pkg" -target /
shell: bash
# tree-sitter setup
- name: Set up tree-sitter CLI (Linux)
if: runner.os == 'Linux'
run: |
sudo apt-get update
sudo apt-get install -y libc6-dev gcc-multilib
curl -LO https://github.com/tree-sitter/tree-sitter/releases/download/v0.25.8/tree-sitter-linux-x86.gz
gunzip tree-sitter-linux-x86.gz
chmod +x tree-sitter-linux-x86
sudo mv tree-sitter-linux-x86 /usr/local/bin/tree-sitter
- name: Set up tree-sitter CLI (macOS)
if: runner.os == 'macOS'
run: brew install tree-sitter-cli
# The installer test suite (crates/quarto/tests/integration/
# bootstrap_sh.rs) REQUIRES minisign — signature verification is
# part of the release-artifact contract and absence fails loudly
# rather than skipping (bd-c6l13j79).
- name: Set up minisign (Linux)
if: runner.os == 'Linux'
run: sudo apt-get install -y minisign
- name: Set up minisign (macOS)
if: runner.os == 'macOS'
run: brew install minisign
# Free disk space on Linux runners (14 GB SSD is tight for Rust monorepo).
# `remove_tool_cache: true` is safe — no step in this job uses /opt/hostedtoolcache/
# (no setup-node, setup-python, etc.). See claude-notes/2026-04-28-ci-disk-space-and-profile-ci.md.
- name: Free disk space
if: runner.os == 'Linux'
uses: endersonmenezes/free-disk-space@7901478139cff6e9d44df5972fd8ab8fcade4db1 # v3
with:
remove_android: true
remove_dotnet: true
remove_haskell: true
remove_tool_cache: true
- name: Prune Docker images
if: runner.os == 'Linux'
shell: bash
run: |
sudo docker image prune --all --force
sudo docker builder prune -a --force
# Formatting gate (before build to fail fast). rustfmt and clippy are
# orthogonal — clippy can pass on code rustfmt would rewrite — so a fmt
# check is needed to stop external PRs landing unformatted code. No
# `rustfmt.toml` in-tree → nightly defaults (the toolchain set up above),
# matching the local `cargo fmt` post-edit hook. Linux-only: formatting is
# platform-independent, so running it once is enough.
- name: Rustfmt (check)
if: runner.os == 'Linux'
shell: bash
run: cargo fmt --all -- --check
# Custom lint checks (before build to fail fast)
- name: Run custom lints
shell: bash
run: cargo xtask lint
# Clippy gate: the workspace clippy policy lives in the root Cargo.toml
# `[workspace.lints.clippy]` table (architectural lints allowed, the rest
# warned); `-D warnings` makes any remaining lint a hard failure. Keep
# this green by fixing lints or adding a justified `#[allow]`.
- name: Clippy (deny warnings)
shell: bash
run: cargo clippy --workspace --all-targets --profile ci -- -D warnings
env:
RUSTFLAGS: "-D warnings"
- name: Test block tree-sitter grammar
shell: bash
run: |
cd crates/tree-sitter-qmd/tree-sitter-markdown
tree-sitter test
# `ci` profile + `--tests` makes a separate `cargo build` redundant.
# `--tests` (not `--all-targets`) excludes benches — `quarto-yaml` declares
# `harness = false` benches that nextest can't enumerate as tests.
# See claude-notes/2026-04-28-ci-disk-space-and-profile-ci.md.
- name: Test Rust code
shell: bash
run: cargo nextest run --tests --cargo-profile ci
env:
RUSTFLAGS: "-D warnings"