Commit fbaf9a86 authored by tom's avatar tom

shard pw test job by project

parent 3ad98112
......@@ -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()
......
......@@ -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'],
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment