# GitHub Actions: Error: Process completed with exit code 1.

**Code:** `Process completed with exit code 1` · **Category:** CI/CD · **Seen on:** GitHub Actions

A `run:` command returned a non-zero status, so the step (and job) failed — the real cause is printed in the log lines above.

## Meaning

Exit code 1 is generic: test failures, a linter, `npm ci`, `grep` finding nothing, or any script error. Scroll up to the first error line of that step, reproduce the command locally with the same versions, and enable debug logging if the output is not enough. Use `set -euo pipefail` to make failures appear where they happen.

## Common causes

- Tests, lint or build failing in the step
- A command in the script exiting 1 (grep without match, diff with changes)
- Missing dependency or wrong version on the runner
- `set -e` stopping the script at the first failed command
- A secret or environment variable missing, so the tool aborts

## Quick fix

1. Read the log above the annotation — the first red line is the cause
2. Reproduce locally with the same command and Node/Python version
3. Add `set -euo pipefail` and echo key variables (not secrets) to locate the failing line

## Detailed fix by platform

### GitHub Actions

1. Re-run with debug logs: re-run job → "Enable debug logging" (or set secret `ACTIONS_STEP_DEBUG=true`)
2. `act` can run workflows locally for quick iteration

## Code examples

### Make failures obvious

```yaml
- name: Test
  shell: bash
  run: |
    set -euo pipefail
    npm ci
    npm test -- --ci
```

## How to diagnose

1. **Log** — What is the first error line in the step?
2. **Local** — Does the same command fail locally?
3. **Env** — Same tool versions as the runner?

---
Source: [WhatIsMyError](https://whatismyerror.com/errors/cicd/gha-process-completed-exit-code-1)
