Add PR validation pipeline: CI, Dependabot auto-merge, Playwright tests#104
Merged
Conversation
- Add playwright.config.ts with webServer (preview on port 4321), chromium project - Add npm scripts: test (playwright), check (astro check) - Fix tests/health.spec.ts to use baseURL from config instead of hardcoded path - Add .github/workflows/ci.yml: typecheck, build, playwright on PRs - Enhance .github/dependabot.yaml: grouped minor/patch, labels, PR limits - Add .github/workflows/dependabot-automerge.yml: auto-approve+merge patch/minor - Add CI/automation section to README with manual setup instructions - Install @astrojs/check, typescript, @types/node as devDependencies - Exclude tests/ and playwright.config.ts from astro check scope - Fix pre-existing heroTitle null-check error in index.astro Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com>
Astro 6.x requires Node.js >=22.12.0. The deploy workflow already uses node-version 22; align CI to match. Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com>
Contributor
There was a problem hiding this comment.
Pull request overview
Adds an automated PR validation pipeline (typecheck/build/e2e), plus Dependabot update grouping and an auto-merge workflow, along with small code/test adjustments to support the new CI checks.
Changes:
- Introduces a new PR CI workflow that installs deps, runs
astro check, builds, and executes Playwright tests (with report artifact upload on failure). - Adds Playwright configuration + npm scripts/dependencies to support typechecking and e2e testing.
- Enhances Dependabot configuration and adds a Dependabot auto-approve/auto-merge workflow; documents the automation in the README.
Show a summary per file
| File | Description |
|---|---|
| tsconfig.json | Adjusts TS excludes for the new tooling/tests. |
| tests/health.spec.ts | Updates the health check test to use a relative URL (baseURL-driven). |
| src/pages/index.astro | Adds a defensive null-check for heroTitle in the scroll fallback. |
| README.md | Documents the new CI/automation pipeline and local commands. |
| playwright.config.ts | Adds Playwright test runner configuration + webServer integration. |
| package.json | Adds check/test scripts and new devDependencies for typechecking/testing. |
| package-lock.json | Locks newly added devDependencies and their transitive deps. |
| .github/workflows/dependabot-automerge.yml | Adds a workflow intended to auto-approve/auto-merge Dependabot PRs. |
| .github/workflows/ci.yml | Adds a PR CI workflow for install/typecheck/build/e2e test. |
| .github/dependabot.yaml | Expands Dependabot settings (scheduling, labels, grouping, PR limits). |
Copilot's findings
Tip
Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.
- Files reviewed: 8/10 changed files
- Comments generated: 2
Co-authored-by: Copilot Autofix powered by AI <175728472+Copilot@users.noreply.github.com>
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
Sets up an end-to-end automated PR validation and dependency management pipeline for this repo. Today, PRs (including Dependabot PRs) merge with zero automated checks. This PR adds three automation layers:
1. ✅ Validate & Test (
ci.yml)A new CI workflow that runs on every pull request:
npm ciastro checknpm run buildnpx playwright install --with-deps chromiumnpm run testThe Playwright HTML report is uploaded as an artifact on failure for easy debugging.
What was wired up:
playwright.config.tswithwebServerpointing atnpm run preview(port 4321)testandchecknpm scriptstests/health.spec.tsto usebaseURLfrom config instead of hardcodedhttp://localhost:4321/octocanvas@astrojs/check,typescript, and@types/nodeas devDependenciesheroTitlenull-check error that would have blockedastro check2. 🤖 Dependabot + Auto-merge
dependabot.yaml(enhanced): npm + github-actions ecosystems, weekly on Mondays, grouped minor/patch updates, labels (dependencies,npm/github-actions), sensible open-PR limitsdependabot-automerge.yml: auto-approves and squash-merges Dependabot PRs for patch/minor updates once CI passes; major updates are left for manual review3. 📝 README documentation
Added a "CI / Automation" section documenting the pipeline and local testing commands.
These are repo settings that can't be configured via files — a human needs to toggle them:
cistatus check to pass before merging tomain.Local validation
All checks pass locally: