shard pw test job by project

This commit is contained in:
tom
2023-06-16 15:23:44 -04:00
parent b0b6b9cc43
commit 32eda7e62d
2 changed files with 11 additions and 4 deletions
+7 -2
View File
@@ -92,12 +92,17 @@ jobs:
run: yarn test:jest
pw_tests:
name: Run components visual tests with PlayWright
name: 'Run components visual tests with PlayWright, project: ${{ matrix.project }}'
needs: [ code_quality ]
runs-on: ubuntu-latest
container:
image: mcr.microsoft.com/playwright:v1.32.0-focal
strategy:
fail-fast: false
matrix:
project: [ default, mobile, dark-color-mode ]
steps:
- name: Install git-lfs
run: apt-get update && apt-get install git-lfs
@@ -127,7 +132,7 @@ jobs:
run: yarn --frozen-lockfile --offline
- name: Run PlayWright
run: HOME=/root yarn test:pw
run: HOME=/root ./playwright/make-envs-script.sh && NODE_OPTIONS=\"--max-old-space-size=4096\" playwright test -c playwright-ct.config.ts --project=${{ matrix.project }}
- name: Upload test results
if: always()
+4 -2
View File
@@ -63,7 +63,9 @@ const config: PlaywrightTestConfig = defineConfig({
},
},
/* Configure projects for major browsers */
// configured projects
// these projects are also used for sharding tests in CI
// when adding or deleting a project, make sure to update github workflow accordingly
projects: [
{
name: 'default',
@@ -81,7 +83,7 @@ const config: PlaywrightTestConfig = defineConfig({
},
},
{
name: 'dark color mode',
name: 'dark-color-mode',
grep: /\+@dark-mode/,
use: {
...devices['Desktop Chrome'],