Repository navigation
ci: test what a change reaches, not everything on every push - #225
Merged
Merged
Conversation
A pull request tests the packages it changes and those that depend on them, as pnpm's ...[<commit>] filter reads the change; skills/ adds the author package and apps/skills, and any other file outside the packages that is not docs tests everything. Firefox and WebKit run when the player, the runtime or the demo changed, the VS Code job when the extension or what it carries did. A pull request's run leaves out the player's three browser files that wait out real time (H5P_TEST_SKIP_SLOW); a push to main tests what it changed with every file, and a weekly run tests everything. A change to the docs alone starts no run.
Contributor
There was a problem hiding this comment.
All reported issues were addressed across 4 files
Reply with feedback, questions, or to request a fix.
View guided diff | Turn on auto-fix | Re-trigger cubic
The engines job runs when the player, the runtime or the demo changed, the app's tests every time and the player's suite only for the first two. A change outside the packages tests everything unless it is docs, LICENSE included, and typecheck runs in every package that has the script.
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.
Closes #224
CI now tests what a change reaches instead of everything on every push.
What a run tests
design/,docs/, root.md,LICENSEscopejob reads the change: pnpm's...[<commit>]filter for packages and apps, plus the author package andapps/skillsforskills/. Any other file outside the packages that is not docs (the lockfile, a workflow, the root'spackage.json) tests everything.pnpm typecheckstill covers every package: each package's check writes the types the next one reads, and it takes seconds.stalling-host,worker-updateandlarge-media, listed in the player'svite.config.tsand left out underH5P_TEST_SKIP_SLOW. They take 115 s of test time in Chromium and 120 s in Firefox. Main's run after the merge has them, sodesign/testing.mdnow says to wait for it before publishing the player.to-scormis not among the slow files: it runs on every pull request that testsapps/skills, being the one check of the h5p-to-scorm skill's text against the embed README.Testing
The scope step, simulated on a fresh shallow clone with a fake commit per kind of change, run as a pull request's run:
packages/authorskills/h5p-author/SKILL.mddesign/author.mdpluspackages/authorpackages/playerpackages/runtimeapps/demopagepackages/embedpackages/verifypackages/cmi5packages/vscodepnpm-lock.yaml, another workflowIt found one bug, fixed before this commit: pnpm counts a file outside the packages as the root project's, and the root's
testscript tests everything. The step now leaves the root out.vitest list --project browser: 36 files, and 33 withH5P_TEST_SKIP_SLOW=1; the three named are the ones missing.The player's
typecheckpasses. The workflow parses, with each job'sneedsandifas intended.Not verified
Release
None: no package's published files change.
Summary by cubic
Closes #224: CI now tests what a change reaches instead of everything on every push. A new
scopejob picks the packages a change touches and their dependents via pnpm's...[<commit>]filter. Pull requests test only those, skip the player's three slow browser files, and run Firefox and WebKit only when the player, runtime, or demo changed. Pushes to main run the same selection including the slow files; weekly and manual runs test everything. Docs-only changes (design/,docs/, root markdown,LICENSE) start no run.pnpm typecheckstill covers every package, in seconds.package.json) test everything.Testing
Release
Written for commit 139b9b5. Summary will update on new commits.