ci: speed up e2e workflow with filtered install and build - #3872
Draft
nameless-mc wants to merge 1 commit into
Draft
ci: speed up e2e workflow with filtered install and build#3872nameless-mc wants to merge 1 commit into
nameless-mc wants to merge 1 commit into
Conversation
Only @kintone/rest and @kintone/create-plugin have a test:e2e script, but the e2e workflow installed and built all 11 workspace packages on every matrix leg. - Install only the workspace root and the two e2e packages (12 -> 3 projects) - Build only @kintone/create-plugin, whose e2e tests run bin/cli.js; @kintone/rest's e2e tests import the sources directly - Replace pnpm dlx (downloads on every run) with @stoplight/prism-cli and wait-on as devDependencies of @kintone/rest, managed via the lockfile, and start the mock server after pnpm install
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.
Why
The
test e2eworkflow installs and builds all 11 workspace packages on every matrix leg (3 OS × 3 Node = 9 jobs), although only@kintone/restand@kintone/create-pluginhave atest:e2escript. It also downloads@stoplight/prism-cliandwait-onviapnpm dlxon every run, outside the lockfile.What
--filter(12 → 3 projects)@kintone/create-plugin, whose e2e tests runbin/cli.js;@kintone/rest's e2e tests import the sources directly, so they don't need a build@stoplight/prism-cliandwait-onfrompnpm dlxtodevDependenciesof@kintone/rest, so their versions (including transitive dependencies) are pinned via the lockfile, and start the mock server afterpnpm installNote: this PR only reduces the install/build portion of each leg. The dominant cost of the workflow (the create-plugin e2e tests, which run real
npm install, and the size of the matrix itself) is out of scope and will be addressed separately.How to test
Reproduced the workflow steps locally in the same order:
pnpm install --frozen-lockfile --filter @kintone/js-sdk --filter @kintone/rest --filter @kintone/create-plugin→ "Scope: 3 of 12 workspace projects"pnpm --filter @kintone/create-plugin run buildwait-onsucceedspnpm --filter @kintone/rest run test:e2e— 4 passedpnpm --filter @kintone/create-plugin run test:e2e— 14 passedThe
test e2eworkflow on this PR also verifies the change end-to-end.Checklist
pnpm lintandpnpm teston the root directory.