Skip to content

Commit

Permalink
Deduplicate CI testing (#4206)
Browse files Browse the repository at this point in the history
* 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 <hello@rich-harris.dev>
  • Loading branch information
mrkishi and Rich-Harris authored Mar 4, 2022
1 parent 2bd1ae2 commit cdc32a9
Show file tree
Hide file tree
Showing 2 changed files with 6 additions and 19 deletions.
22 changes: 4 additions & 18 deletions packages/kit/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -60,30 +60,16 @@
"build": "rollup -c && node scripts/cp.js src/runtime/components assets/components && npm run types",
"dev": "rollup -cw",
"lint": "eslint --ignore-path .gitignore --ignore-pattern \"src/packaging/test/**\" \"{src,test}/**/*.{ts,mjs,js,svelte}\" && npm run check-format",
"check": "tsc && npm run check:integration && npm run check:prerendering",
"check:integration": "npm run check:integration:amp && npm run check:integration:basics && npm run check:integration:options && npm run check:integration:options-2",
"check:integration:amp": "cd test/apps/amp && pnpm sync && pnpm check",
"check:integration:basics": "cd test/apps/basics && pnpm sync && pnpm check",
"check:integration:options": "cd test/apps/options && pnpm sync && pnpm check",
"check:integration:options-2": "cd test/apps/options-2 && pnpm sync && pnpm check",
"check:prerendering": "npm run check:prerendering:basics && npm run check:prerendering:options",
"check:prerendering:basics": "cd test/prerendering/basics && pnpm sync && pnpm check",
"check:prerendering:options": "cd test/prerendering/options && pnpm sync && pnpm check",
"check": "tsc",
"check:all": "tsc && pnpm run -r check --filter ./",
"format": "npm run check-format -- --write",
"check-format": "prettier --check . --config ../../.prettierrc --ignore-path .gitignore",
"prepublishOnly": "npm run build",
"test": "npm run test:unit && npm run test:typings && npm run test:packaging && npm run test:prerendering && npm run test:integration",
"test": "npm run test:unit && npm run test:typings && npm run test:packaging",
"test:all": "pnpm run -r test --workspace-concurrency 1 --filter ./",
"test:unit": "uvu src \"(spec\\.js|test[\\\\/]index\\.js)\" -i packaging",
"test:typings": "tsc --project test/typings",
"test:prerendering": "pnpm test:prerendering:basics && pnpm test:prerendering:options",
"test:prerendering:basics": "cd test/prerendering/basics && pnpm test",
"test:prerendering:options": "cd test/prerendering/options && pnpm test",
"test:packaging": "uvu src/packaging \"(spec\\.js|test[\\\\/]index\\.js)\"",
"test:integration": "pnpm test:integration:amp && pnpm test:integration:basics && pnpm test:integration:options && pnpm test:integration:options-2",
"test:integration:amp": "cd test/apps/amp && pnpm test",
"test:integration:basics": "cd test/apps/basics && pnpm test",
"test:integration:options": "cd test/apps/options && pnpm test",
"test:integration:options-2": "cd test/apps/options-2 && pnpm test",
"types": "node scripts/extract-types.js"
},
"exports": {
Expand Down
3 changes: 2 additions & 1 deletion packages/kit/test/utils.js
Original file line number Diff line number Diff line change
Expand Up @@ -169,7 +169,8 @@ export const config = {
use: {
screenshot: 'only-on-failure',
trace: 'retain-on-failure'
}
},
workers: process.env.CI ? 2 : undefined
};

/**
Expand Down

0 comments on commit cdc32a9

Please sign in to comment.