Repository navigation
test: run most tests without Nuxt and drop low-value ones - #511
Merged
Merged
Conversation
Most suites build a fresh database per test and replayed every migration each time, about 100 ms per database. Replay each migration list once per file and deserialize the image after that. Node before 24.16 has no serialize, so it keeps the replay.
These files read source or docs and grep the text, assert copy and markup, restate constant tables, or repeat another file's coverage. None of them can catch a behaviour bug that typecheck, lint, or a remaining test would miss.
Every file booted a Nuxt app, though about 40 of 377 use it. The default environment is now node. Files that mount components or read Nuxt runtime config carry the .nuxt.test.ts suffix, so defineVitestConfig runs them in its nuxt project. The node project runs in vmThreads and drops the @nuxt/test-utils setup file, which loaded Vue and its compiler in every file. Workers now follow the CPU quota: 2 workers under the 4-CPU CI quota left half of it idle. Also removes single cases that grep source, assert copy or class names, or restate constant tables, and the node environment pragmas that now repeat the default.
Open branches edit these four files. Leaving their redundant node pragma in place keeps those merges free of conflicts.
Draft #321 adds a noindex case to this file. Deleting it would leave that draft a modify and delete conflict.
Contributor
🤖 MERGED
GitHub merged this pull request.
Review completed. No finding above 80/100. Selected findings run after merge and open separate pull requests. |
Contributor
There was a problem hiding this comment.
Harlan Agent Kit posted this automated review. AI open source policy.
Automated Review: READY.
At 300 KiB the 7-byte chunk case timed out under the full suite's worker count. 20 KiB still crosses many tar blocks at every chunk size.
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.
❓ Type of change
📚 Description
The test job is the slowest part of CI. Every test file booted a full Nuxt app, though only 38 of 411 files use one, and many files asserted source text, copy, or constants instead of behaviour.
node. Files that mount components or read Nuxt runtime config end in.nuxt.test.ts, sodefineVitestConfigruns them in itsnuxtproject.nodeproject is lighter. It runs invmThreads, which reuses workers instead of starting one per file. It also drops the@nuxt/test-utilssetup file, which loaded@vue/test-utilsand the Vue compiler in every file.availableParallelism() - 2gave 2 workers under a 4-CPU quota. The cap is now 4 to 12.createSqliteD1loads a migrated image. It replays each migration list once per file, then deserializes that image for every later database. Replaying all migrations cost about 100 ms per database. Node before 24.16 has noserialize, so it keeps the replay.// @vitest-environment nodepragmas go too, except in four files that open branches also edit.pnpm exec vitest runon19e98400f(this branch's base) and on this branch, back to back:The quota run used
systemd-run --user --scope -p CPUQuota=400%. Its baseline matches the old workstation CI container, where the vitest step ona22194589took 152 s.Deleted files
Copy and markup (11). These assert rendered text, labels, classes, or attributes with no interaction.
community-creator-ui.test.ts: text, labels, classes, and aria stringscompact-page-header-ui.test.ts: h1 text, id, and slot container classesdigest-template.test.ts: copy strings thatdigest-previewanddigest-deliverycover through outputgenerated-content-labels.test.ts: one label string in the rendered digestog-image-curator.test.ts: rendered OG text;og-props.test.tscovers the numeric login coercionog-image-skill.test.ts: rendered OG text and img attributesrepo-skill-dependencies.test.ts: rendered links, labels, and tooltip textsetup-snippet.test.ts: rendered code lines and a highlighter classskill-receipts-panel.test.ts: title attributes that restate theIntlformatter optionsskills-registry-loading-state.test.ts: mounts the whole page to count skeleton rowsweekly-email-preview-inert.test.ts: mounts a component to assert oneinertattributeFact checks (7). These restate a constant or a one-line implementation.
agents.test.ts:AGENT_TARGETSfields are non-empty and ids are uniquecomparison-navigation.test.ts: a three-entry featured table behind oneincludes()operational-event.test.ts: a two-line implementationrepo-source-fallback.test.ts: the constant object the function returnsskills-collision.test.ts: tests schema and SQL written inside the test, with no site codeskills-sitemap-outcomes.test.ts: a constant list mapped fromCLUSTERStag-link-path.test.ts:MARKETING_REDIRECTSentries through a one-line lookupTypecheck already proves it (3).
identity-query-contracts.test.ts: query keys, paths, and schema references from sourcemarketing-content-config.test.ts: the content collection config shapescripts-beacon-offline-fallback.test.ts: importsnuxt.configand asserts one flagDuplicates (3).
author-profile-badge.test.ts:author-badgeandbadge-embed-controlcover the badge pathme-subroute-routing.test.ts:page-routing.test.tsbuilds the router from every pageprotocol-fixtures.test.ts: parses upstream fixtures with upstream schemas, with no site codeSource and docs scans (4).
copy-contract.test.ts: readsCOPY.md,nuxt.config.ts, and.vuesources and scans the textdocs-fold-contract.test.ts: grepsDESIGN.mdanddocs/workbriefsno-private-page-components.test.ts: asserts that a file does not existtitle-template-suffix.test.ts: greps page.vuefiles for the title suffixRemoved single cases (49)
cache-write-best-effort: the two cases that grep server sources foruseStorage('cache')daily-checkin-observability: the case that reads every workflow filemcp-tools.spec: the case that compares two description stringsskill-agent-markdown.spec: two exact Agent instruction sentencescluster-membership,registry-convergence: SQL text substringscontent-negotiation,skill-related-cache,skill-search-fusion: a restatedVaryconstant, cache key, and key templateinstall-cmd,published-cli-grammar,production-smoke,skills-leaderboard: restated command lists, route tables, and seed rowsintegrity-runtime: the contrast of a template colour constantskill-badge: an SVG path stringtrending-range: eight cases that restate titles, headings, and constantsweekly-template(9) andweekly-email-improvements(2): theme colours and copylike-button,header-color-mode,me-watchlist(2),developers-page,skill-source-list(2),skill-command-panel-setup-link,skill-detail-duplicate-canonical-path,skill-detail-howto-schema,skill-detail-missing-search(3): class names, copy, or static hrefs with no interactiongithub-badge-brand-kit.test.tsstays, because draft #321 adds a noindex case to it.