GitHub Actions passing but broken: silent CI failures
A GitHub Actions silent failure is a green run with nothing behind it. Real cases, from an empty artifact upload to a deploy that reports success, with fixes.
By Hamza Ghouri
A red pipeline is annoying, but it tells you something. The dangerous run is the green one that did nothing: no artifact, no tests, a deploy that never finished. A GitHub Actions silent failure is any step that treats "nothing happened" as success, and they are easy to write by accident. This post walks through the ones I hit while building pipelines for a Windows desktop app with a large media library and for a couple of backends, what caused each one, and the setting or habit that turns it into a loud failure.
An artifact upload that matched nothing and still passed
The desktop app's release workflow builds installers and uploads them as an artifact. For a while, runs looked successful and produced no artifact at all.
The cause was one expression. The workflow built the upload path with join(paths, '\n'), expecting one path per line. GitHub expressions do not interpret escape sequences, so '\n' is a backslash followed by the letter n. The result was a single path containing a literal backslash-n, which matched no file on disk. The upload step printed a warning and still exited green.
The fix had two parts: replace the joined expression with plain globs over the bundle output directories, and tell the upload step that finding nothing is an error.
- uses: actions/upload-artifact@v4
with:
name: installers
path: |
build/bundle/msi/*.msi
if-no-files-found: error
The paths are simplified, but the shape is what I use now on every upload step.
Why does upload-artifact pass when no files are found?
Because its if-no-files-found input defaults to warn. The upload-artifact README says that when a path matches no files, the action succeeds and prints a warning, and you can set the input to error to fail the step instead. Set it to error on every upload whose output you depend on, and check path expressions against the GitHub Actions expressions reference, where the only escape inside a string literal is a doubled single quote.
Large files outside git: check what the build really got
The same app ships about 1GB of media in its public/ folder, kept out of git. The workflow restores it from a release asset before building. That setup has two quiet ways to go wrong.
The first was in .gitignore. One line carried a trailing inline comment, which gitignore does not support: a # only starts a comment at the beginning of a line. The pattern on that line became the pattern plus the comment text, which is a different pattern.
The second was size. The artifact came out at about 2GB, because it carried both installers and each one embeds the full media folder. Building only the MSI dropped one of the two copies.
Neither of those fails a run. They show up as a file that is or is not tracked, and an artifact that is bigger than it needs to be. My habit now is to print what the build received and what it produced: a file count and total size of the restored folder, and the size of each artifact. Two lines in the log make both problems visible on the first run.
Deploys that report success before they finish
Deploy steps have their own version of this. On Elastic Beanstalk, these are the rules I wrote down after working through it:
update-environmentreturns before the deploy finishes. Taken alone, it reports success for a deploy that failed. Polldescribe-environmentsuntil the environment is ready and healthy, and fail the job if it is not.- Name each bundle after the commit SHA. With a fixed
build.zip, every upload overwrote the previous bundle, so an older version could not be redeployed. - Zip
.platformand.ebextensionswith the build output. Leave them out and the nginx config silently reverts to the default, and long requests start timing out. - Do not zip
node_moduleson macOS. Native modules built there will not run on Amazon Linux. Install dependencies on the platform that runs them.
I covered the full pipeline in deploying Node.js to Elastic Beanstalk with CI/CD, and the credentials side in deploying to AWS from GitHub Actions with OIDC.
Test runners that quietly select the wrong tests
Test selection is another place where a config can drop work without failing. In a Playwright config, testMatch and testIgnore regexes are matched against the full file path. A pattern written as /demo-.*\.spec\.ts/ to pick out demo specs also matched every spec inside any directory whose name started with demo-, and the normal suite, which ignored that pattern, reported "No tests found". Anchoring the pattern on the path separator and the end of the string fixed it.
In that case the run was loud, because the regex swallowed everything the suite had. The same mistake on a larger suite would have removed only some specs, and nothing would have failed. So I'd watch the test count as well as the result. A suite whose test count drops between runs deserves a look even when every remaining test passed. When the tests themselves come from an AI assistant, the same scepticism applies to what they assert, which I wrote about in reviewing AI-generated tests.
Permanent red is a silent failure too
The opposite failure mode looks different and does the same damage. A mobile app's CI job had failed on every push: the analyzer exited on warnings, and three tests were failing. Since it was red every time, it was permanent red noise rather than a signal. Nobody could tell a new failure from the old ones, so it told the team nothing.
We removed it. That sounds backwards, but a job that always fails trains people to ignore the red mark, and that habit spreads to the jobs that matter. The better order is to fix the suite on a branch until it is green, then bring the job back as a required check.
Where I'd start
Go through your workflows and ask, for each step: if this did nothing, would the run fail?
- Set
if-no-files-found: erroron every upload you depend on. - Avoid escape sequences in expressions. Use globs or multi-line YAML strings for lists of paths.
- Log the size and file count of anything restored or produced.
- Make deploy steps wait for the real outcome, and name bundles after the commit.
- Watch test counts, and either fix a permanently red job or remove it until it can pass.
Most of these came from reading what a run claimed against what it produced, the same habit as verifying a refactor by diffing its output. If your pipeline needs this kind of pass, it is part of what I do through my services.