[e2e tests blocks] Configure the number of shards for each matrix project (#45212)
* Reduce the shards from 5 to 2 for blocks e2e tests * Include the workflow in paths * More granular shard config * Refine shards config
This commit is contained in:
parent
5401d143a4
commit
72789656cf
|
@ -6,6 +6,7 @@ on:
|
||||||
- 'plugins/woocommerce/src/Blocks/**'
|
- 'plugins/woocommerce/src/Blocks/**'
|
||||||
- 'plugins/woocommerce/templates/**'
|
- 'plugins/woocommerce/templates/**'
|
||||||
- 'plugins/woocommerce/patterns/**'
|
- 'plugins/woocommerce/patterns/**'
|
||||||
|
- '.github/workflows/blocks-playwright.yml'
|
||||||
|
|
||||||
env:
|
env:
|
||||||
FORCE_COLOR: 1
|
FORCE_COLOR: 1
|
||||||
|
@ -25,21 +26,35 @@ jobs:
|
||||||
- name: Normal
|
- name: Normal
|
||||||
file: playwright.config.ts
|
file: playwright.config.ts
|
||||||
resultPath: test-results
|
resultPath: test-results
|
||||||
|
shard: 1/3
|
||||||
|
- name: Normal
|
||||||
|
file: playwright.config.ts
|
||||||
|
resultPath: test-results
|
||||||
|
shard: 2/3
|
||||||
|
- name: Normal
|
||||||
|
file: playwright.config.ts
|
||||||
|
resultPath: test-results
|
||||||
|
shard: 3/3
|
||||||
- name: Classic
|
- name: Classic
|
||||||
file: playwright.classic-theme.config.ts
|
file: playwright.classic-theme.config.ts
|
||||||
resultPath: test-results-classic-theme
|
resultPath: test-results-classic-theme
|
||||||
|
shard: 1/1
|
||||||
- name: SideEffects
|
- name: SideEffects
|
||||||
file: playwright.side-effects.config.ts
|
file: playwright.side-effects.config.ts
|
||||||
resultPath: test-results-side-effects
|
resultPath: test-results-side-effects
|
||||||
|
shard: 1/3
|
||||||
|
- name: SideEffects
|
||||||
|
file: playwright.side-effects.config.ts
|
||||||
|
resultPath: test-results-side-effects
|
||||||
|
shard: 2/3
|
||||||
|
- name: SideEffects
|
||||||
|
file: playwright.side-effects.config.ts
|
||||||
|
resultPath: test-results-side-effects
|
||||||
|
shard: 3/3
|
||||||
- name: BlockThemeWithTemplates
|
- name: BlockThemeWithTemplates
|
||||||
file: playwright.block-theme-with-templates.config.ts
|
file: playwright.block-theme-with-templates.config.ts
|
||||||
resultPath: test-results-block-theme-with-templates
|
resultPath: test-results-block-theme-with-templates
|
||||||
shards:
|
shard: 1/1
|
||||||
- name: 1/5
|
|
||||||
- name: 2/5
|
|
||||||
- name: 3/5
|
|
||||||
- name: 4/5
|
|
||||||
- name: 5/5
|
|
||||||
steps:
|
steps:
|
||||||
- uses: actions/checkout@v3
|
- uses: actions/checkout@v3
|
||||||
|
|
||||||
|
@ -57,7 +72,7 @@ jobs:
|
||||||
|
|
||||||
- name: Run Playwright tests
|
- name: Run Playwright tests
|
||||||
working-directory: plugins/woocommerce-blocks
|
working-directory: plugins/woocommerce-blocks
|
||||||
run: pnpm playwright test --config=tests/e2e/${{ matrix.config.file }} --shard ${{ matrix.shards.name }}
|
run: pnpm playwright test --config=tests/e2e/${{ matrix.config.file }} --shard ${{ matrix.config.shard }}
|
||||||
|
|
||||||
- uses: actions/upload-artifact@v3
|
- uses: actions/upload-artifact@v3
|
||||||
if: ${{ failure() }}
|
if: ${{ failure() }}
|
||||||
|
|
Loading…
Reference in New Issue