Interview Prep/CI/CD/GitHub Actions and GitLab CI in Production

How do you debug a GitHub Actions job that works locally but fails in CI?

BeginnerProductionGitHub Actions and GitLab CI in Production
Answer

Compare environments: runner image versions (the runner image's tool versions are listed in the job's "Set up job" log), shell defaults, environment variables, working directory, shallow checkout, file permissions, and case-sensitive file systems (macOS dev machines versus Linux runners). Enable step debug logging, print env, pwd and tool versions, and reproduce in the same container image locally. Pin tool versions with setup actions instead of relying on the runner defaults.

All CI/CD questions Roadmap: GitLab CI/CD

More on GitHub Actions and GitLab CI in Production