Skip to content

fix(ci): fix CI workflow failing in 0s due to invalid hashFiles() usage#5

Merged
jack-arturo merged 2 commits into
mainfrom
fix/ci-hashfiles-workflow
Mar 3, 2026
Merged

fix(ci): fix CI workflow failing in 0s due to invalid hashFiles() usage#5
jack-arturo merged 2 commits into
mainfrom
fix/ci-hashfiles-workflow

Conversation

@jack-arturo

Copy link
Copy Markdown
Member

Summary

  • hashFiles() is only valid in step-level if conditions, not job-level — this caused every CI run to fail immediately (0s, no jobs started) since the workflow was first added
  • The smoke-playwright job that used it has been removed (no tests/smoke.spec.ts exists yet; can be re-added when Playwright tests land)
  • Fixed three shellcheck warnings in the runtime smoke step: single-quoted trap, unused loop variable _, and find instead of ls

Test plan

  • CI passes on this PR
  • Runtime smoke step completes without shellcheck violations

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.
@coderabbitai

coderabbitai Bot commented Mar 3, 2026

Copy link
Copy Markdown
Contributor
📝 Walkthrough

Summary by CodeRabbit

  • Chores
    • Improved CI workflow robustness and reliability with enhanced shell script handling and asset discovery mechanisms.

Walkthrough

This 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

Cohort / File(s) Summary
CI Workflow Configuration
.github/workflows/ci.yml
Updated shell script compatibility by replacing for i in {1..20} with for _ in $(seq 20), improved asset discovery from simple ls pipe to robust find-based approach with xargs, changed trap command quoting from double to single quotes, and removed the entire smoke-playwright job block.

Estimated code review effort

🎯 2 (Simple) | ⏱️ ~10 minutes

🚥 Pre-merge checks | ✅ 3
✅ Passed checks (3 passed)
Check name Status Explanation
Title check ✅ Passed The title accurately summarizes the main change: fixing a CI workflow issue caused by invalid hashFiles() usage at the job level.
Description check ✅ Passed The description is directly related to the changeset, explaining the hashFiles() fix, smoke-playwright job removal, and shellcheck warning corrections.
Docstring Coverage ✅ Passed No functions found in the changed files to evaluate docstring coverage. Skipping docstring coverage check.

✏️ Tip: You can configure your own custom pre-merge checks in the settings.

✨ Finishing Touches
🧪 Generate unit tests (beta)
  • Create PR with unit tests
  • Post copyable unit tests in a comment
  • Commit unit tests in branch fix/ci-hashfiles-workflow

Comment @coderabbitai help to get the list of available commands and usage tips.

@coderabbitai coderabbitai Bot left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

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`.

ℹ️ Review info

Configuration used: Organization UI

Review profile: CHILL

Plan: Pro

📥 Commits

Reviewing files that changed from the base of the PR and between f5c15f7 and 8419379.

📒 Files selected for processing (1)
  • .github/workflows/ci.yml

Comment thread .github/workflows/ci.yml Outdated
Co-authored-by: coderabbitai[bot] <136622811+coderabbitai[bot]@users.noreply.github.com>
@jack-arturo jack-arturo merged commit 0363353 into main Mar 3, 2026
1 check passed
@jack-arturo jack-arturo deleted the fix/ci-hashfiles-workflow branch March 3, 2026 13:35
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant