-
Notifications
You must be signed in to change notification settings - Fork 463
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
chore(demo-playwright): add
Playwright
- Loading branch information
1 parent
7b59023
commit 05d87b7
Showing
11 changed files
with
217 additions
and
124 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
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 was deleted.
Oops, something went wrong.
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 |
---|---|---|
|
@@ -45,21 +45,7 @@ jobs: | |
strategy: | ||
fail-fast: false | ||
matrix: | ||
project: | ||
[ | ||
addon-doc, | ||
addon-charts, | ||
addon-commerce, | ||
addon-mobile, | ||
addon-preview, | ||
addon-table, | ||
addon-tablebars, | ||
icons, | ||
core, | ||
deep, | ||
demo, | ||
kit, | ||
] | ||
project: [addon-mobile] | ||
name: ${{ matrix.project }} | ||
steps: | ||
- uses: actions/[email protected] | ||
|
@@ -100,6 +86,10 @@ jobs: | |
- name: Clean up resources | ||
run: npx kill-port --port ${{ env.NG_SERVER_PORT }} | ||
|
||
- name: Debug output | ||
continue-on-error: true | ||
run: tree ${{ env.SNAPSHOTS_PATH }} | ||
|
||
- name: Upload artifacts / ${{ env.SNAPSHOTS_ARTIFACTS_KEY }} | ||
uses: actions/[email protected] | ||
with: | ||
|
@@ -108,32 +98,63 @@ jobs: | |
if-no-files-found: ignore | ||
retention-days: 1 | ||
|
||
result: | ||
playwright: | ||
if: ${{ !contains(github.head_ref , 'release/') }} | ||
name: result | ||
needs: [cypress] | ||
runs-on: ubuntu-latest | ||
needs: [build-demo] | ||
steps: | ||
- uses: actions/[email protected] | ||
- name: Setup global variables | ||
uses: ./.github/actions/variables | ||
- name: Setup Node.js and Cache | ||
uses: ./.github/actions/nodejs | ||
|
||
- name: Download artifacts / ${{ env.SNAPSHOTS_ARTIFACTS_KEY }} | ||
continue-on-error: true | ||
uses: actions/[email protected] | ||
with: | ||
name: ${{ env.SNAPSHOTS_ARTIFACTS_KEY }} | ||
path: ${{ env.SNAPSHOTS_PATH }} | ||
- name: Install Playwright Browsers | ||
run: npx playwright install --with-deps | ||
|
||
- name: Upload cache / ${{ env.SNAPSHOTS_CACHE_KEY }} | ||
uses: actions/cache/save@v3.3.1 | ||
- name: Download cache / ${{ env.CACHE_DIST_KEY }} | ||
uses: actions/cache/restore@v3.3.1 | ||
with: | ||
path: ${{ env.SNAPSHOTS_PATH }} | ||
key: ${{ env.SNAPSHOTS_CACHE_KEY }} | ||
path: dist/demo | ||
key: ${{ env.CACHE_DIST_KEY }} | ||
|
||
- name: Serve ${{ env.DIST }} in background | ||
run: npx nx serve-compiled demo --path ${{ env.DIST }} --port ${{ env.NG_SERVER_PORT }} | ||
|
||
- name: Run screenshot tests on ${{ env.DIST }} | ||
run: npx nx e2e demo-playwright | ||
|
||
- name: Clean up resources | ||
run: npx kill-port --port ${{ env.NG_SERVER_PORT }} | ||
|
||
- name: Download ${{ env.DIST_NEXT }} for serve locally | ||
run: | | ||
git clone \ | ||
--depth 1 \ | ||
--branch snapshots/demo/next/${{ github.base_ref }} \ | ||
https://github.com/Tinkoff/taiga-ui.git ${{ env.DIST_NEXT }} | ||
- name: Serve ${{ env.DIST_NEXT }} in background | ||
run: npx nx serve-compiled demo --path ${{ env.DIST_NEXT }} --port ${{ env.NG_SERVER_PORT }} | ||
|
||
- name: Run screenshot tests on ${{ env.DIST_NEXT }} | ||
continue-on-error: true | ||
run: npx nx e2e demo-playwright | ||
|
||
- name: Clean up resources | ||
run: npx kill-port --port ${{ env.NG_SERVER_PORT }} | ||
|
||
- name: Debug output | ||
continue-on-error: true | ||
run: tree ${{ env.SNAPSHOTS_PATH }} | ||
run: tree ${{ env.PLAYWRIGHT_SNAPSHOTS_PATH }} | ||
|
||
- name: Upload artifacts / ${{ env.PLAYWRIGHT_SNAPSHOTS_ARTIFACTS_KEY }} | ||
uses: actions/[email protected] | ||
with: | ||
path: ${{ env.PLAYWRIGHT_SNAPSHOTS_PATH }}/**/*-diff.png | ||
name: ${{ env.PLAYWRIGHT_SNAPSHOTS_ARTIFACTS_KEY }} | ||
if-no-files-found: ignore | ||
retention-days: 1 | ||
|
||
concurrency: | ||
group: e2e-${{ github.workflow }}-${{ github.ref }} | ||
|
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
Oops, something went wrong.