Skip to content

Add CI, fix stale tests, and gate deploy behind tags/releases - #29

Merged
mkocansey merged 4 commits into
mainfrom
development
Aug 31, 2026
Merged

Add CI, fix stale tests, and gate deploy behind tags/releases#29
mkocansey merged 4 commits into
mainfrom
development

Conversation

@mkocansey

Copy link
Copy Markdown
Collaborator

Summary

  • Adds .github/workflows/ci.yml: runs php artisan test, pint --test, and an npm build + audit on every pull request and every push to development. There was already a 441-assertion test suite and a Pint config, but nothing ran them automatically.
  • Fixes 6 Feature tests that still asserted the pre-rename mkocansey/bladewind-* package names on /install, plus one (BreadcrumbsDocsTest) asserting a literal icon-dir="" attribute that never renders (iconDir is a declared prop, stripped by exceptPropAliases() before it reaches the tag).
  • Runs Pint across the files it had accumulated style drift on (whitespace/quotes/braces only, no behavior change).
  • Rewires deploy.yml: drops the push-to-main trigger, leaving tag (v*) and release-published (plus manual dispatch) as the only ways to ship. Merging to main now just merges; CI is the merge gate, a tag/release is the deploy trigger.

Test plan

Six Feature tests still asserted the old mkocansey/bladewind-* package
names on /install, from before the bladewindui/ui rename. The
breadcrumbs test also asserted a literal icon-dir="" attribute that
never renders: iconDir is a declared component prop, so Blade's
exceptPropAliases() strips it before anything reaches the <a>/<span>
tag. Swapped it for an assertion that an icon example actually
rendered.

Also ran Pint across the handful of files it had accumulated style
drift on (alignment, quote style, brace placement). No behavioural
changes, just what a green `pint --test` needs.
There was a real test suite (441 assertions) and a Pint config, but
nothing ran them: the only workflow was deploy.yml, which shipped to
production on every push to main. Add ci.yml running php artisan test,
pint --test, and an npm build + audit on pull requests and pushes to
development, so a broken page or a failing build is caught before a PR
merges rather than after it deploys.

Also drop deploy.yml's push-to-main trigger, leaving tag (v*) and
release-published as the only ways to ship. Merging to main now just
merges; a tag or release is what deploys.
.env.example is gitignored in this repo, so a fresh checkout has no file
for `cp .env.example .env` to find and the job failed immediately.
Laravel reads config straight from the process environment when no
.env exists, so set APP_ENV/APP_KEY/DB_CONNECTION/DB_DATABASE as job env
instead of trying to materialize a file. Verified against a disposable
clone with no .env and no committed database.sqlite.
Docs pages render through @Vite, which needs public/build/manifest.json.
That only exists after `npm run build`, which was in a separate job with
its own runner and no access to the PHP job's filesystem, so every test
that rendered a page failed with "Vite manifest not found." Merged into
one job: PHP and Node setup, install, build, then test and lint.
Verified against a disposable clone with no .env, no database.sqlite,
and no public/build.
@mkocansey
mkocansey merged commit ccce52c into main Aug 31, 2026
2 checks passed
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