mirror of
https://github.com/luxfi/explore.git
synced 2026-09-24 00:28:18 +00:00
shard pw test job by project
This commit is contained in:
@@ -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'],
|
||||
|
||||
Reference in New Issue
Block a user