Add Glade to CI
Use Glade in CI when pull requests need local checks, affected tests, saved reports, and stable process exits.
Before you start
Fetch enough git history for origin/main. Create reports before writing artifacts. Use JSON, SARIF, and JUnit for machines; keep human output for local runs.
Steps
Write SARIF for code scanning:
bash
mkdir -p reports
glade check --project . --format sarif --output reports/glade-check.sarifRun changed tests as JSON:
bash
glade test changed --project . --since origin/main --json --no-progressWrite JUnit:
bash
glade test --project . --junit reports/glade-junit.xml --no-progressExpected output
glade check writes SARIF to the report path. Changed tests write JSON to stdout. JUnit output lands in reports/glade-junit.xml. Non-zero exit codes mark failed gates.
Common wrong turn
Do not hide failed checks with broad || true shell glue. Let Glade fail the gate, then upload artifacts with the CI system's always-run upload step.