GitHub Actions CI
Enforce chaos quality gates with --ci / --strict and automatic $GITHUB_STEP_SUMMARY reports.
Workflow
.github/workflows/loki.yml
name: loki-chaos-gateon: [pull_request]jobs:chaos:runs-on: ubuntu-lateststeps:- uses: actions/checkout@v4- run: pipx install loki-chaos-agent- run: loki install-browser chromium- name: Run LOKI Swarm Chaos Gateenv:GEMINI_API_KEY: ${{ secrets.GEMINI_API_KEY }}run: loki run http://localhost:8000 --swarm --duration 6 --ci- name: Upload LOKI Evidence Bundlesif: always()uses: actions/upload-artifact@v4with:name: loki-evidence-bundlespath: .loki/runs/
CI flags & environment variables
| Flag | Type | Default | Description |
|---|---|---|---|
| --ci | bool | false | Enable strict CI/CD gate mode: disables browser auto-open and exits with code 1 on any crash, failure, or .loki/rules.md violation. |
| --strict | bool | false | Fail with exit code 1 if any crash or business rule violation (VIOLATED) is detected, even outside a CI environment. |
| --authorized | bool | false | Required in non-interactive CI runs when testing a non-localhost URL (e.g. a staging or preview deployment). |
| $GITHUB_STEP_SUMMARY | env | auto | When set by GitHub Actions, CIGate.write_github_step_summary() automatically appends a Markdown scorecard (metrics, mobile layout anomalies, business rules table, crashes, and .loki/runs/ artifact path) to the workflow summary. |
| CI=true | env | auto | CIGate.is_ci_environment() automatically detects CI=true/1/yes and activates the quality gate exit codes. |
