[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/templates/**'
|
||||
- 'plugins/woocommerce/patterns/**'
|
||||
- '.github/workflows/blocks-playwright.yml'
|
||||
|
||||
env:
|
||||
FORCE_COLOR: 1
|
||||
|
@ -25,21 +26,35 @@ jobs:
|
|||
- name: Normal
|
||||
file: playwright.config.ts
|
||||
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
|
||||
file: playwright.classic-theme.config.ts
|
||||
resultPath: test-results-classic-theme
|
||||
shard: 1/1
|
||||
- name: SideEffects
|
||||
file: playwright.side-effects.config.ts
|
||||
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
|
||||
file: playwright.block-theme-with-templates.config.ts
|
||||
resultPath: test-results-block-theme-with-templates
|
||||
shards:
|
||||
- name: 1/5
|
||||
- name: 2/5
|
||||
- name: 3/5
|
||||
- name: 4/5
|
||||
- name: 5/5
|
||||
shard: 1/1
|
||||
steps:
|
||||
- uses: actions/checkout@v3
|
||||
|
||||
|
@ -57,7 +72,7 @@ jobs:
|
|||
|
||||
- name: Run Playwright tests
|
||||
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
|
||||
if: ${{ failure() }}
|
||||
|
|
Loading…
Reference in New Issue