fix(ci): fix CI workflow failing in 0s due to invalid hashFiles() usage#5
Merged
Conversation
hashFiles() is not available in job-level if conditions (only step-level), causing every CI run to fail in 0s. Remove the smoke-playwright job (no tests exist yet) and clean up shellcheck warnings in the runtime smoke step: trap now uses single quotes, loop variable renamed to _, ls replaced with find.
Contributor
📝 WalkthroughSummary by CodeRabbit
WalkthroughThis PR updates the GitHub Actions CI workflow configuration to improve shell script portability and robustness. Changes include replacing brace expansion syntax with seq, enhancing asset discovery using find instead of ls, adjusting quoting conventions, and removing the smoke-playwright CI job entirely. Changes
Estimated code review effort🎯 2 (Simple) | ⏱️ ~10 minutes 🚥 Pre-merge checks | ✅ 3✅ Passed checks (3 passed)
✏️ Tip: You can configure your own custom pre-merge checks in the settings. ✨ Finishing Touches🧪 Generate unit tests (beta)
Comment |
Contributor
There was a problem hiding this comment.
Actionable comments posted: 1
🤖 Prompt for all review comments with AI agents
Verify each finding against the current code and only fix it if needed.
Inline comments:
In @.github/workflows/ci.yml:
- Line 39: Replace the pipeline that assigns asset using `find ... | xargs ... |
head -n 1` (the `asset` variable assignment) with a pipefail-safe bash builtin
approach: run `find` with `-print0` into a process substitution and read the
first null-delimited result into a shell variable (or use `mapfile`/`readarray`
with `-d ''`) and then extract the basename into `asset`; update the code that
references `asset` accordingly so no external `head`/`xargs` early-exit can
produce a SIGPIPE under `pipefail`.
Co-authored-by: coderabbitai[bot] <136622811+coderabbitai[bot]@users.noreply.github.com>
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Summary
hashFiles()is only valid in step-levelifconditions, not job-level — this caused every CI run to fail immediately (0s, no jobs started) since the workflow was first addedsmoke-playwrightjob that used it has been removed (notests/smoke.spec.tsexists yet; can be re-added when Playwright tests land)trap, unused loop variable_, andfindinstead oflsTest plan