Skip to content

CI integration

Nijam is built to run in CI. You don’t pass commit, branch, PR, or author by hand — the reporter detects them automatically from your CI provider, so each run lands in history with full context.

Commit, branch, PR number, CI run id, CI run URL, and the git author (email + name). Resolution order, per field:

  1. CI-specific environment variables (see below)
  2. Generic GIT_* / BRANCH / COMMIT_SHA variables
  3. A git log / git rev-parse shell-out
  4. Empty (branch is left unset → the dashboard shows “No Branch Info”)

Detected from GITHUB_SHA, GITHUB_REF_NAME, GITHUB_HEAD_REF, GITHUB_RUN_ID, GITHUB_REPOSITORY, GITHUB_SERVER_URL.

.github/workflows/e2e.yml
name: e2e
on: [push, pull_request]
jobs:
test:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v4
- uses: actions/setup-node@v4
with: { node-version: 22 }
- run: npm ci
- run: npx playwright install --with-deps
- run: npx playwright test
env:
NIJAM_API_KEY: ${{ secrets.NIJAM_API_KEY }}

On a provider not listed above, set the generic variables and the reporter picks them up:

VariableMaps to
COMMIT_SHAcommit
BRANCHbranch
CI_RUN_IDCI run id
CI_URLCI run URL

If none are set, the reporter still falls back to git, so local runs are attributed too. The full variable list lives in the CI variables reference.

To send runs and reports to Nijam, the reporter needs two things — set both in playwright.config.ts:

  • projectId — which project to push to. Not a secret; it just identifies the project.
  • apiKey — the only secret. Store it as NIJAM_API_KEY in your CI secrets and reference it via process.env.NIJAM_API_KEY.

Everything else — commit, branch, PR, CI link, author — is detected automatically.