-
Notifications
You must be signed in to change notification settings - Fork 466
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
Showing
11 changed files
with
115 additions
and
32 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 |
---|---|---|
|
@@ -90,13 +90,22 @@ jobs: | |
|
||
playwright: | ||
if: ${{ !contains(github.head_ref , 'release/') }} | ||
runs-on: ubuntu-latest | ||
needs: [build-demo] | ||
strategy: | ||
fail-fast: false | ||
max-parallel: 9 | ||
matrix: | ||
shard: [ | ||
# Safari | ||
{index: 1, os: 'macos-latest', project: 'webkit', total: 9}, | ||
{index: 2, os: 'macos-latest', project: 'webkit', total: 9}, | ||
{index: 3, os: 'macos-latest', project: 'webkit', total: 9}, | ||
{index: 4, os: 'macos-latest', project: 'webkit', total: 9}, | ||
{index: 5, os: 'macos-latest', project: 'webkit', total: 9}, | ||
{index: 6, os: 'macos-latest', project: 'webkit', total: 9}, | ||
{index: 7, os: 'macos-latest', project: 'webkit', total: 9}, | ||
{index: 8, os: 'macos-latest', project: 'webkit', total: 9}, | ||
{index: 9, os: 'macos-latest', project: 'webkit', total: 9}, | ||
# Chrome | ||
{index: 1, os: 'ubuntu-latest', project: 'chromium', total: 9}, | ||
{index: 2, os: 'ubuntu-latest', project: 'chromium', total: 9}, | ||
|
@@ -109,9 +118,15 @@ jobs: | |
{index: 9, os: 'ubuntu-latest', project: 'chromium', total: 9}, | ||
] | ||
name: Playwright / ${{ matrix.shard.os }} / ${{ matrix.shard.index }} of ${{ matrix.shard.total }} | ||
runs-on: ${{ matrix.shard.os }} | ||
steps: | ||
- uses: actions/[email protected] | ||
- uses: taiga-family/ci/actions/setup/[email protected] | ||
|
||
- name: Mac OS X building all dependencies | ||
if: ${{ contains( matrix.shard.os, 'macos') }} | ||
run: brew install pkg-config cairo pango libpng jpeg-turbo giflib librsvg --force || echo '' | ||
|
||
- uses: taiga-family/ci/actions/setup/[email protected] | ||
|
||
- name: Get installed Playwright version | ||
|
@@ -175,27 +190,20 @@ jobs: | |
npm view canvas version | ||
npx ts-node ./scripts/visual-testing/combine-playwright-failed-screenshots.ts | ||
- name: Debug output | ||
continue-on-error: true | ||
run: tree ${{ env.PLAYWRIGHT_SNAPSHOTS_PATH }} | ||
|
||
- name: Upload artifacts / ${{ env.PLAYWRIGHT_SNAPSHOTS_ARTIFACTS_KEY }} | ||
uses: actions/[email protected] | ||
with: | ||
path: ./projects/demo-playwright/tests-results/**/*-retry${{ env.RETRY_COUNT }}/*.diff.png | ||
name: '${{ env.PLAYWRIGHT_SNAPSHOTS_ARTIFACTS_KEY }}_${{ matrix.shard.project }}_${{ matrix.shard.index }}' | ||
name: ${{ env.PLAYWRIGHT_SNAPSHOTS_ARTIFACTS_KEY }}_${{ matrix.shard.index }} | ||
if-no-files-found: ignore | ||
compression-level: 0 | ||
retention-days: 1 | ||
|
||
- name: | ||
Upload reports / blob-reports_${{ env.PLAYWRIGHT_SNAPSHOTS_ARTIFACTS_KEY }}_${{ matrix.shard.os }}_${{ | ||
matrix.shard.index }} | ||
- name: Upload reports / ${{ env.PLAYWRIGHT_BLOB_ARTIFACTS_KEY }}_${{ matrix.shard.index }} | ||
uses: actions/[email protected] | ||
with: | ||
path: ./projects/demo-playwright/blob-report | ||
name: | ||
blob-reports_${{ env.PLAYWRIGHT_SNAPSHOTS_ARTIFACTS_KEY }}_${{ matrix.shard.os }}_${{ matrix.shard.index }} | ||
name: ${{ env.PLAYWRIGHT_BLOB_ARTIFACTS_KEY }}_${{ matrix.shard.index }} | ||
compression-level: 0 | ||
retention-days: 1 | ||
|
||
|
@@ -231,7 +239,7 @@ jobs: | |
uses: actions/[email protected] | ||
with: | ||
path: ./total/playwright | ||
pattern: ${{ env.PLAYWRIGHT_SNAPSHOTS_ARTIFACTS_KEY }}_* | ||
pattern: playwright-snapshots-artifacts--* | ||
merge-multiple: true | ||
- run: ls -R ./total/playwright || echo "not found" | ||
|
||
|
@@ -240,7 +248,7 @@ jobs: | |
uses: actions/[email protected] | ||
with: | ||
path: ./total/cypress | ||
pattern: ${{ env.CYPRESS_SNAPSHOTS_ARTIFACTS_KEY }} | ||
pattern: cypress-snapshots-artifacts--* | ||
merge-multiple: true | ||
- run: ls -R ./total/cypress || echo "not found" | ||
|
||
|
@@ -249,12 +257,12 @@ jobs: | |
uses: actions/[email protected] | ||
with: | ||
path: all-blob-reports | ||
pattern: blob-reports_${{ env.PLAYWRIGHT_SNAPSHOTS_ARTIFACTS_KEY }}_* | ||
pattern: playwright-blob-artifacts--* | ||
merge-multiple: true | ||
- run: ls -R ./all-blob-reports || echo "not found" | ||
|
||
- name: Merge into HTML Report | ||
run: npx playwright merge-reports --reporter html,json ./all-blob-reports > ./all-blob-reports/results.json | ||
run: npx playwright merge-reports --config=projects/demo-playwright/merge.config.ts ./all-blob-reports | ||
|
||
- name: Deploy e2e report | ||
id: e2e-report | ||
|
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 |
---|---|---|
@@ -0,0 +1,15 @@ | ||
import {resolve} from 'node:path'; | ||
|
||
/** | ||
* https://playwright.dev/docs/test-sharding#merge-reports-cli | ||
*/ | ||
export default { | ||
testDir: __dirname, | ||
reporter: [ | ||
[ | ||
'html', | ||
{open: 'never', outputFolder: resolve(process.cwd(), 'playwright-report')}, | ||
], | ||
['json', {outputFile: resolve(process.cwd(), 'all-blob-reports/results.json')}], | ||
], | ||
}; |
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
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
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
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
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
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
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
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
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