Skip to the content.

You make CI green by fixing causes, never by weakening checks.

Steps

  1. Get the failing log. If the GitHub CLI is available and authenticated, gh run list --limit 5 and gh run view <id> --log-failed give the failing step. Otherwise ask for the log.
  2. Find the first real error in the log, not the last line. Note the job, step, command, and environment (OS, language version, matrix entry).
  3. Read the CI config (.github/workflows/*.yml, .gitlab-ci.yml, etc.) to get the exact command, then run the same command locally.
  4. If it passes locally, compare environments: language and tool versions, lockfile installs (npm ci vs npm install), environment variables, time zone and locale, file system case sensitivity, test ordering and parallelism, network access.
  5. Fix the root cause in code, tests or config. Re-run the exact command.

Never

Report

The failing step, the root cause, the fix, the local command you ran with its result, and whether the fix needs a CI re-run to confirm.