-
Notifications
You must be signed in to change notification settings - Fork 42
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Merge branch 'main' into python-playwright
- Loading branch information
Showing
2 changed files
with
64 additions
and
29 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,27 +1,62 @@ | ||
name: Playwright Tests | ||
name: "Playwright Tests" | ||
|
||
on: | ||
push: | ||
branches: [main, master] | ||
branches: | ||
- main | ||
pull_request: | ||
branches: [main, master] | ||
branches: [main] | ||
|
||
jobs: | ||
test: | ||
timeout-minutes: 60 | ||
strategy: | ||
fail-fast: false | ||
matrix: | ||
shard: [1/4, 2/4, 3/4, 4/4] | ||
runs-on: ubuntu-latest | ||
steps: | ||
- uses: actions/checkout@v3 | ||
- uses: actions/setup-node@v3 | ||
with: | ||
node-version: 18 | ||
- name: Install dependencies | ||
run: npm ci | ||
- name: Install Playwright Browsers | ||
run: npx playwright install --with-deps | ||
- name: Run Playwright tests | ||
run: npx playwright test | ||
- uses: actions/upload-artifact@v3 | ||
if: always() | ||
with: | ||
name: playwright-report | ||
path: playwright-report/ | ||
retention-days: 30 | ||
- uses: actions/checkout@v3 | ||
- uses: actions/setup-node@v3 | ||
- name: Install dependencies | ||
run: npm ci | ||
- name: Install Playwright browsers | ||
run: npx playwright install --with-deps | ||
|
||
- name: Run Playwright tests | ||
run: npx playwright test --shard ${{ matrix.shard }} | ||
|
||
- name: Upload blob report to GitHub Actions Artifacts | ||
if: always() | ||
uses: actions/upload-artifact@v3 | ||
with: | ||
name: all-blob-reports | ||
path: blob-report | ||
retention-days: 1 | ||
|
||
merge-reports: | ||
# Merge reports after playwright-tests, even if some shards have failed | ||
if: always() | ||
needs: [test] | ||
|
||
runs-on: ubuntu-latest | ||
steps: | ||
- uses: actions/checkout@v3 | ||
- uses: actions/setup-node@v3 | ||
- name: Install dependencies | ||
run: npm ci | ||
|
||
- name: Download blob reports from GitHub Actions Artifacts | ||
uses: actions/download-artifact@v3 | ||
with: | ||
name: all-blob-reports | ||
path: all-blob-reports | ||
|
||
- name: Merge into HTML Report | ||
run: npx playwright merge-reports --reporter html ./all-blob-reports | ||
|
||
- name: Upload HTML report | ||
uses: actions/upload-artifact@v3 | ||
with: | ||
name: html-report--attempt-${{ github.run_attempt }} | ||
path: playwright-report | ||
retention-days: 14 |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters