Skip to content

Comments

test: avoid redundant html validation#1083

Merged
danielroe merged 4 commits intonpmx-dev:mainfrom
essenmitsosse:avoid-redundant-html-validation
Feb 6, 2026
Merged

test: avoid redundant html validation#1083
danielroe merged 4 commits intonpmx-dev:mainfrom
essenmitsosse:avoid-redundant-html-validation

Conversation

@essenmitsosse
Copy link
Contributor

@essenmitsosse essenmitsosse commented Feb 6, 2026

Currently the HTML validation via @nuxtjs/html-validator runs 4 times:

  • in Vercel
  • for ci: "🖥️ Browser tests"
  • for ci: "♿ Accessibility audit (light)"
  • for ci: "♿ Accessibility audit (dark)"

If there is any html validation error, all 4 fail, making things look worse then they are.

This changes it so, that the validation is skipped for all 3 ci tests and only runs on Vercel.

This also removes the script build:playwright, because I don't think anyone will use that locally and it wasn't even used consequently in all tests.

I think ideally the html validation shouldn't run on Vercel (so you still get a deploy preview), and run somewhere else (ci: "🖥️ Browser tests" or a separate test), but that would require to changing the Vercel build script.

@vercel
Copy link

vercel bot commented Feb 6, 2026

The latest updates on your projects. Learn more about Vercel for GitHub.

Project Deployment Actions Updated (UTC)
npmx.dev Ready Ready Preview, Comment Feb 6, 2026 11:36am
2 Skipped Deployments
Project Deployment Actions Updated (UTC)
docs.npmx.dev Ignored Ignored Preview Feb 6, 2026 11:36am
npmx-lunaria Ignored Ignored Feb 6, 2026 11:36am

Request Review

@codecov
Copy link

codecov bot commented Feb 6, 2026

Codecov Report

✅ All modified and coverable lines are covered by tests.
✅ All tests successful. No failed tests found.

📢 Thoughts on this report? Let us know!

@coderabbitai
Copy link
Contributor

coderabbitai bot commented Feb 6, 2026

📝 Walkthrough

Walkthrough

CI and a11y workflows were updated to use a new test-focused build step: pnpm build:test (replacing pnpm build:playwright / NODE_ENV=test pnpm build) and the browser CI step sets VALIDATE_HTML=true. nuxt.config.ts now imports isCI and provider and changes htmlValidator.enabled to be enabled when not in CI, or in CI only when the provider is not Vercel and VALIDATE_HTML is truthy. package.json adds build:test, removes build:playwright, and updates browser test scripts to run pnpm build:test. No public exported APIs were changed.

Possibly related PRs

🚥 Pre-merge checks | ✅ 1
✅ Passed checks (1 passed)
Check name Status Explanation
Description check ✅ Passed The pull request description clearly relates to the changeset, explaining the motivation for disabling HTML validation in CI jobs and keeping it on Vercel.

✏️ Tip: You can configure your own custom pre-merge checks in the settings.

✨ Finishing touches
  • 📝 Generate docstrings
🧪 Generate unit tests (beta)
  • Create PR with unit tests
  • Post copyable unit tests in a comment

Comment @coderabbitai help to get the list of available commands and usage tips.

@danielroe
Copy link
Member

@OrbisK's suggestion is the native way to do this

however, enabling this only in test mode will prevent it being added on prod deployments, but will also prevent it being loaded in development, where it's useful.

and it will still run for both browser + a11y tests....

let me push a change.

@essenmitsosse
Copy link
Contributor Author

Yeah great, opt-in is even better.

Merged via the queue into npmx-dev:main with commit 48fa041 Feb 6, 2026
17 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.

3 participants