Add CI, fix stale tests, and gate deploy behind tags/releases - #29
Merged
Conversation
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.
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
.github/workflows/ci.yml: runsphp artisan test,pint --test, and an npm build + audit on every pull request and every push todevelopment. There was already a 441-assertion test suite and a Pint config, but nothing ran them automatically.mkocansey/bladewind-*package names on/install, plus one (BreadcrumbsDocsTest) asserting a literalicon-dir=""attribute that never renders (iconDiris a declared prop, stripped byexceptPropAliases()before it reaches the tag).deploy.yml: drops the push-to-maintrigger, leaving tag (v*) and release-published (plus manual dispatch) as the only ways to ship. Merging tomainnow just merges; CI is the merge gate, a tag/release is the deploy trigger.Test plan
php artisan test— 441 passedvendor/bin/pint --test— passednpm run build— succeedsnpm audit --audit-level=high— 0 vulnerabilitiesdevelopment: https://github.com/bladewindui/docs/actions/runs/33440608634