GitHub ActionsNew
Add Iris health checks to your CI pipeline. Every push and pull request runs iris check against your workspace — if any file falls below your configured threshold, the workflow fails and the merge is blocked.
What the workflow does
- Installs the Iris CLI via
npm install -g @iris-code/cli - Runs
iris check .against your workspace using your configured threshold - Exits with code
1if any file falls below the threshold — blocking the merge - Uploads a JSON report as a build artifact so you can review findings without re-running
Full workflow
Copy this into .github/workflows/iris.yml in your repository.
.github/workflows/iris.yml
name: Iris Health Check
on:
push:
branches: [main]
pull_request:
branches: [main]
jobs:
iris:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v4
- uses: actions/setup-node@v4
with:
node-version: '20'
- name: Install Iris CLI
run: npm install -g @iris-code/cli
- name: Check code health
run: iris check . --format json --output iris-report.json
env:
IRIS_LICENCE_TOKEN: ${{ secrets.IRIS_LICENCE_TOKEN }}
- uses: actions/upload-artifact@v4
if: always()
with:
name: iris-report
path: iris-report.jsonTip: Add
IRIS_LICENCE_TOKEN to your repository secrets under Settings → Secrets and variables → Actions. Directory scans require a Pro licence — the workflow will run as Free and skip the directory check if no token is provided.Setting a threshold
Control the minimum health score by adding a .irisconfig.json at your project root:
.irisconfig.json
{
"minHealthScore": 75,
"ignoreFiles": ["**/*.test.ts", "**/generated/**"]
}If no config is present, the default threshold of 70 is used.
Enforcement gate (Pro)
For a more detailed breakdown — pass/fail per rule with actual vs threshold values — use iris gate instead of iris check:
.github/workflows/iris.yml
- name: Run enforcement gate
run: iris gate . --format json --output iris-gate.json
env:
IRIS_LICENCE_TOKEN: ${{ secrets.IRIS_LICENCE_TOKEN }}Gate rules (gateMaxSecrets, gateMaxComplexity, gateMaxFileLength) are configured in .irisconfig.json.
Exit codes
| Code | Meaning |
|---|---|
0 | All files pass — workflow continues |
1 | One or more files fail — workflow blocked |
2 | Invalid arguments or config error |
Note: The Iris CLI is available via
npm install -g @iris-code/cli. No VS Code installation required for CI use.