Skip to content

Commit cdc32a9

Browse files
mrkishiRich-Harris
andauthored
Deduplicate CI testing (#4206)
* deduplicate tests * Update packages/kit/package.json * parallelize tests * test if splitting basics helps any * Revert "parallelize tests" This reverts commit 470b4fb. * reduce number of test scripts * increase playwright workers on ci * reduce script further Co-authored-by: Rich Harris <[email protected]>
1 parent 2bd1ae2 commit cdc32a9

File tree

2 files changed

+6
-19
lines changed

2 files changed

+6
-19
lines changed

packages/kit/package.json

Lines changed: 4 additions & 18 deletions
Original file line numberDiff line numberDiff line change
@@ -60,30 +60,16 @@
6060
"build": "rollup -c && node scripts/cp.js src/runtime/components assets/components && npm run types",
6161
"dev": "rollup -cw",
6262
"lint": "eslint --ignore-path .gitignore --ignore-pattern \"src/packaging/test/**\" \"{src,test}/**/*.{ts,mjs,js,svelte}\" && npm run check-format",
63-
"check": "tsc && npm run check:integration && npm run check:prerendering",
64-
"check:integration": "npm run check:integration:amp && npm run check:integration:basics && npm run check:integration:options && npm run check:integration:options-2",
65-
"check:integration:amp": "cd test/apps/amp && pnpm sync && pnpm check",
66-
"check:integration:basics": "cd test/apps/basics && pnpm sync && pnpm check",
67-
"check:integration:options": "cd test/apps/options && pnpm sync && pnpm check",
68-
"check:integration:options-2": "cd test/apps/options-2 && pnpm sync && pnpm check",
69-
"check:prerendering": "npm run check:prerendering:basics && npm run check:prerendering:options",
70-
"check:prerendering:basics": "cd test/prerendering/basics && pnpm sync && pnpm check",
71-
"check:prerendering:options": "cd test/prerendering/options && pnpm sync && pnpm check",
63+
"check": "tsc",
64+
"check:all": "tsc && pnpm run -r check --filter ./",
7265
"format": "npm run check-format -- --write",
7366
"check-format": "prettier --check . --config ../../.prettierrc --ignore-path .gitignore",
7467
"prepublishOnly": "npm run build",
75-
"test": "npm run test:unit && npm run test:typings && npm run test:packaging && npm run test:prerendering && npm run test:integration",
68+
"test": "npm run test:unit && npm run test:typings && npm run test:packaging",
69+
"test:all": "pnpm run -r test --workspace-concurrency 1 --filter ./",
7670
"test:unit": "uvu src \"(spec\\.js|test[\\\\/]index\\.js)\" -i packaging",
7771
"test:typings": "tsc --project test/typings",
78-
"test:prerendering": "pnpm test:prerendering:basics && pnpm test:prerendering:options",
79-
"test:prerendering:basics": "cd test/prerendering/basics && pnpm test",
80-
"test:prerendering:options": "cd test/prerendering/options && pnpm test",
8172
"test:packaging": "uvu src/packaging \"(spec\\.js|test[\\\\/]index\\.js)\"",
82-
"test:integration": "pnpm test:integration:amp && pnpm test:integration:basics && pnpm test:integration:options && pnpm test:integration:options-2",
83-
"test:integration:amp": "cd test/apps/amp && pnpm test",
84-
"test:integration:basics": "cd test/apps/basics && pnpm test",
85-
"test:integration:options": "cd test/apps/options && pnpm test",
86-
"test:integration:options-2": "cd test/apps/options-2 && pnpm test",
8773
"types": "node scripts/extract-types.js"
8874
},
8975
"exports": {

packages/kit/test/utils.js

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -169,7 +169,8 @@ export const config = {
169169
use: {
170170
screenshot: 'only-on-failure',
171171
trace: 'retain-on-failure'
172-
}
172+
},
173+
workers: process.env.CI ? 2 : undefined
173174
};
174175

175176
/**

0 commit comments

Comments
 (0)