Skip to content

Fix failing "Build Assets" GitHub Actions job#362

Open
jbrooksuk wants to merge 2 commits into
mainfrom
ci/speed-up-test-suite
Open

Fix failing "Build Assets" GitHub Actions job#362
jbrooksuk wants to merge 2 commits into
mainfrom
ci/speed-up-test-suite

Conversation

@jbrooksuk

@jbrooksuk jbrooksuk commented Jun 17, 2026

Copy link
Copy Markdown
Member

The build-assets job in run-tests.yml was failing because the CSS files reference Filament vendor assets (vendor/filament/support/resources/css/index.css and vendor/filament/filament/resources/css/theme.css) that only exist after Composer dependencies are installed. The job was running npm run build without first installing PHP dependencies, causing Vite to fail when it couldn't resolve those imports.

Root Cause

resources/css/cachet.css and resources/css/dashboard/theme.css both import CSS files from the vendor/ directory. The build-assets job did not include a PHP/Composer setup step, so the vendor directory was empty at build time.

Fix

Added PHP setup and Composer dependency installation steps to the build-assets job in .github/workflows/run-tests.yml, mirroring what the compile-assets.yml workflow already does correctly.

Speed up the test workflow:

1. Remove Xdebug coverage. `composer test` ran `pest --coverage` under
   Xdebug in every matrix job, but nothing consumed the report (no upload,
   no `--min` threshold). Drop `--coverage` from the test:unit script and
   set `coverage: none` in setup-php so Xdebug isn't loaded at all — it's
   the single largest slowdown in the suite.

2. Build front-end assets once. The compiled assets are identical across
   every test job, so build them in a dedicated `build-assets` job and
   share them via an artifact, instead of running `npm ci && npm run build`
   in all of them. Also cache the Composer download directory per
   php/stability so `composer update` doesn't re-download packages.

Co-Authored-By: Claude Opus 4.8 (1M context) <noreply@anthropic.com>
Copilot AI changed the title ci: speed up the test workflow (drop coverage, build assets once) Fix failing "Build Assets" GitHub Actions job Jun 17, 2026
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.

2 participants