diff --git a/.github/workflows/playwright.yml b/.github/workflows/playwright.yml index 03649340ea..aa25617762 100644 --- a/.github/workflows/playwright.yml +++ b/.github/workflows/playwright.yml @@ -40,7 +40,7 @@ jobs: matrix: shardIndex: [1, 2, 3, 4] shardTotal: [4] - os: [ubuntu-latest, windows-latest] + os: [ubuntu-latest, windows-latest, macos-14] runs-on: ${{ matrix.os }} needs: check-rust-changes steps: @@ -63,7 +63,13 @@ jobs: key: ${{ runner.os }}-playwright-${{ hashFiles('yarn.lock') }} - name: Install Playwright Browsers shell: bash + if: ${{ !startsWith(matrix.os, 'macos') }} run: yarn playwright install --with-deps + - name: install chrome from the cask macos + if: ${{ startsWith(matrix.os, 'macos') }} + shell: bash + run: | + brew install --cask google-chrome - name: Download Wasm Cache id: download-wasm if: needs.check-rust-changes.outputs.rust-changed == 'false' @@ -125,7 +131,7 @@ jobs: - name: build web run: yarn build:local shell: bash - - name: Run ubuntu/chrome snapshots + - name: Run playwright/chrome snapshots shell: bash run: | yarn playwright test --project="Google Chrome" --config=playwright.ci.config.ts --retries="3" --update-snapshots --grep=@snapshot --shard=${{ matrix.shardIndex }}/${{ matrix.shardTotal }} @@ -139,7 +145,7 @@ jobs: - uses: actions/upload-artifact@v4 if: ${{ !cancelled() && (success() || failure()) }} with: - name: playwright-report-ubuntu-snapshot-${{ matrix.shardIndex }}-${{ github.sha }} + name: playwright-report-${{matrix.os}}-snapshot-${{ matrix.shardIndex }}-${{ github.sha }} path: playwright-report/ retention-days: 30 overwrite: true @@ -174,14 +180,14 @@ jobs: - uses: actions/upload-artifact@v4 if: steps.git-check.outputs.modified == 'true' with: - name: playwright-report-ubuntu-${{ matrix.shardIndex }}-${{ github.sha }} + name: playwright-report-${{matrix.os}}-${{ matrix.shardIndex }}-${{ github.sha }} path: playwright-report/ retention-days: 30 - uses: actions/download-artifact@v4 if: ${{ !cancelled() && (success() || failure()) }} continue-on-error: true with: - name: test-results-ubuntu-${{ matrix.shardIndex }}-${{ github.sha }} + name: test-results-${{matrix.os}}-${{ matrix.shardIndex }}-${{ github.sha }} path: test-results/ - name: Run playwright/chrome flow (with retries) id: retry @@ -244,14 +250,14 @@ jobs: - uses: actions/upload-artifact@v4 if: always() with: - name: test-results-ubuntu-${{ matrix.shardIndex }}-${{ github.sha }} + name: test-results-${{matrix.os}}-${{ matrix.shardIndex }}-${{ github.sha }} path: test-results/ retention-days: 30 overwrite: true - uses: actions/upload-artifact@v4 if: always() with: - name: playwright-report-ubuntu-${{ matrix.shardIndex }}-${{ github.sha }} + name: playwright-report-${{matrix.os}}-${{ matrix.shardIndex }}-${{ github.sha }} path: playwright-report/ retention-days: 30 overwrite: true @@ -351,7 +357,7 @@ jobs: if: ${{ !cancelled() && (success() || failure()) }} continue-on-error: true with: - name: test-results-ubuntu-${{ github.sha }} + name: test-results-${{matrix.os}}-${{ github.sha }} path: test-results/ - name: Run electron tests (with retries) id: retry