DevFixes
HomeYAMLCI and automation
GitHub ActionsIntermediateHigh severity

Error: Process completed with exit code 1

A command inside a GitHub Actions step returned a non-zero exit status, so the runner marked the step and job as failed.

10-30 min Popularity 95/100 Verified 2026-07-21
Debug with AI

What does this error mean?

Exit code 1 is a generic failure signal. The useful error is usually earlier in the same step log, where a test, build, linter, shell command, or setup task explains why it stopped.

Why does this happen?

  • A test, build, lint, or type-check command failed.
  • The runner is missing an environment variable, secret, file, or service.
  • The workflow uses a different runtime or dependency version than local development.
  • A shell command relies on the wrong working directory or operating system.
  • An earlier setup step completed incompletely but did not stop the job.

AI explanation

Plain-English analysis

GitHub Actions is reporting the final process status, not the root cause. Open the first failed step, move upward from the exit-code line, and find the earliest application-specific error. Reproduce that exact command with the same runtime version and environment before changing the workflow.

Quick fix

Terminal
git grep -n "run:" .github/workflows
git status --short
npm test
Expected output: The same command that failed in the workflow completes locally with exit code 0, or produces a specific error you can address.

Step-by-step fix

1Find the first real error in the failed stepExpand the first red workflow step and inspect the lines above the generic exit-code message.92%
2Reproduce the exact CI command locallyUse the same runtime version, package manager, working directory, and command defined in the workflow.78%
Command
node --version
npm ci
npm test
3Verify secrets and environment variablesConfirm that required repository or environment secrets exist and are available to this event and job.57%

Alternative solutions

Node.js workflow

npm ci
npm run lint
npm test
npm run build

Run commands separately to identify the first script returning a non-zero status.

Python workflow

python -m pip install -r requirements.txt
python -m pytest -vv

Match the Python version declared in actions/setup-python.

Docker workflow

docker build --progress=plain .

Plain progress output exposes the build command and layer that failed.

Debug logging

echo "ACTIONS_STEP_DEBUG=true"

Enable step debug logging through the GitHub Actions secret documented by GitHub, not by printing secrets in the workflow.

Real example

Broken
yaml
steps:
  - uses: actions/checkout@v4
  - run: npm test
Corrected
yaml
steps:
  - uses: actions/checkout@v4
  - uses: actions/setup-node@v4
    with:
      node-version: 22
      cache: npm
  - run: npm ci
  - run: npm test

Frequently asked questions

It means a process failed in a generic way. The lines immediately before it normally contain the specific test, build, shell, or configuration error.

References