Skip to content

CI Failure Investigation and Fix Walkthrough

CI Failure Investigation and Fix Walkthrough

Section titled “CI Failure Investigation and Fix Walkthrough”

We successfully resolved a series of CI failures to get the build green.

Update (2026-02-11): Cloudflare Docs Deploy Failure

Section titled “Update (2026-02-11): Cloudflare Docs Deploy Failure”

The Deploy Docs to Cloudflare Pages workflow failed on main with:

  • /home/runner/setup-pnpm/.../pnpm exit code 1

Deploy workflow used an older pnpm setup action path than CI and lacked deterministic lockfile install settings, causing setup drift in GitHub Actions.

  • Updated .github/workflows/deploy.yaml from pnpm/action-setup@v3 to pnpm/action-setup@v4.
  • Pinned pnpm to 10.28.0.
  • Added cache-dependency-path: pnpm-lock.yaml to Node setup.
  • Switched dependency install to pnpm install --frozen-lockfile.
  • Local reproduction passed:
    • pnpm install --frozen-lockfile
    • pnpm --filter docs build
  • Workflow then deployed successfully from updated branch state.

The initial error “packages field missing or empty” was caused by a mismatch between the local pnpm version (v10) and the CI version (v9). Attempting to use a v10 lockfile with v9 caused the failure.

Resolution: Updated .github/workflows/ci.yml to use pnpm v10.

The system-test job failed because the app lacked the test/system directory.

Resolution:

  • Created test/application_system_test_case.rb configured for headless Chrome.
  • Created test/system/sanity_test.rb with a basic home page check.

The lint job failed due to trailing whitespace in the new test file.

Resolution: Removed trailing whitespace from test/system/sanity_test.rb.

System tests failed on CI with ActiveRecord::ConnectionNotEstablished trying to connect to ::1.

Resolution: Explicitly set PGHOST and DATABASE_URL to 127.0.0.1 in .github/workflows/ci.yml.

System tests crashed due to database constraint violations in the auto-generated fixtures.

  • users.yml: Missing account_id and email (NOT NULL constraints).
  • admin_users.yml: Duplicate empty emails (Unique constraint).
  • accounts.yml: Invalid Array syntax (MyText instead of []).

Resolution: Updated all fixtures with valid, constraint-compliant data.

All jobs passed successfully in the final run:

  • test: ✅ Success
  • lint: ✅ Success
  • system-test: ✅ Success
  • scan_ruby: ✅ Success

Success