ci(e2e): speed up playwright with 2 machines (#17630)

* ci(e2e): speed up playwright with 4 machines

* Increase playwright machine to 2
This commit is contained in:
Chirag Madlani 2024-08-29 19:32:39 +05:30 committed by GitHub
parent fed12172f4
commit d36f0e1615
No known key found for this signature in database
GPG Key ID: B5690EEEBB952194
2 changed files with 14 additions and 4 deletions

View File

@ -39,6 +39,11 @@ jobs:
playwright-ci-mysql:
runs-on: ubuntu-latest
environment: test
strategy:
fail-fast: false
matrix:
shardIndex: [1, 2]
shardTotal: [2]
steps:
- name: Free Disk Space (Ubuntu)
uses: jlumbroso/free-disk-space@main
@ -96,7 +101,7 @@ jobs:
run: npx playwright@1.44.1 install --with-deps
- name: Run Playwright tests
working-directory: openmetadata-ui/src/main/resources/ui/
run: npx playwright test
run: npx playwright test --shard=${{ matrix.shardIndex }}/${{ matrix.shardTotal }}
env:
PLAYWRIGHT_IS_OSS: true
PLAYWRIGHT_SNOWFLAKE_USERNAME: ${{ secrets.TEST_SNOWFLAKE_USERNAME }}
@ -151,7 +156,7 @@ jobs:
- uses: actions/upload-artifact@v4
if: ${{ !cancelled() }}
with:
name: playwright-report
name: playwright-report--${{ matrix.shardIndex }}
path: openmetadata-ui/src/main/resources/ui/playwright/output/playwright-report
retention-days: 5

View File

@ -39,6 +39,11 @@ jobs:
playwright-ci-postgresql:
runs-on: ubuntu-latest
environment: test
strategy:
fail-fast: false
matrix:
shardIndex: [1, 2]
shardTotal: [2]
steps:
- name: Free Disk Space (Ubuntu)
uses: jlumbroso/free-disk-space@main
@ -96,7 +101,7 @@ jobs:
run: npx playwright@1.44.1 install --with-deps
- name: Run Playwright tests
working-directory: openmetadata-ui/src/main/resources/ui/
run: npx playwright test
run: npx playwright test --shard=${{ matrix.shardIndex }}/${{ matrix.shardTotal }}
env:
PLAYWRIGHT_IS_OSS: true
PLAYWRIGHT_SNOWFLAKE_USERNAME: ${{ secrets.TEST_SNOWFLAKE_USERNAME }}
@ -151,7 +156,7 @@ jobs:
- uses: actions/upload-artifact@v4
if: ${{ !cancelled() }}
with:
name: playwright-report
name: playwright-report-${{ matrix.shardIndex }}
path: openmetadata-ui/src/main/resources/ui/playwright/output/playwright-report
retention-days: 5