From d36f0e161544f4e43471893ca80ccc0ee2eb4362 Mon Sep 17 00:00:00 2001 From: Chirag Madlani <12962843+chirag-madlani@users.noreply.github.com> Date: Thu, 29 Aug 2024 19:32:39 +0530 Subject: [PATCH] ci(e2e): speed up playwright with 2 machines (#17630) * ci(e2e): speed up playwright with 4 machines * Increase playwright machine to 2 --- .github/workflows/playwright-mysql-e2e.yml | 9 +++++++-- .github/workflows/playwright-postgresql-e2e.yml | 9 +++++++-- 2 files changed, 14 insertions(+), 4 deletions(-) diff --git a/.github/workflows/playwright-mysql-e2e.yml b/.github/workflows/playwright-mysql-e2e.yml index cd78dd8d5e5..4fb1cf74ab2 100644 --- a/.github/workflows/playwright-mysql-e2e.yml +++ b/.github/workflows/playwright-mysql-e2e.yml @@ -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 diff --git a/.github/workflows/playwright-postgresql-e2e.yml b/.github/workflows/playwright-postgresql-e2e.yml index 8044572e6ff..24a9d5a5285 100644 --- a/.github/workflows/playwright-postgresql-e2e.yml +++ b/.github/workflows/playwright-postgresql-e2e.yml @@ -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