-
Notifications
You must be signed in to change notification settings - Fork 10
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
chore: add new workflow to regenerate snapshots on failure (#2373)
* chore: add new workflow to regenerate snapshots on failure * fix: issues with results for workflow call * test: regeneration * test: regeneration
- Loading branch information
Showing
3 changed files
with
69 additions
and
0 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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,63 @@ | ||
name: 🎭 Playwright E2E | ||
|
||
on: | ||
workflow_call: | ||
|
||
permissions: | ||
actions: write | ||
contents: write | ||
|
||
jobs: | ||
regenerate-snapshots: | ||
name: 🧪🎭 - Regenerate snapshots | ||
runs-on: ubuntu-latest | ||
container: | ||
image: mcr.microsoft.com/playwright:v1.42.1 | ||
steps: | ||
- name: ⏬ Checkout repo | ||
uses: actions/checkout@v4 | ||
|
||
- name: 🔄 Init Cache | ||
uses: ./.github/actions/npm-cache | ||
|
||
- name: 📲 Install esbuild (binary workaround) | ||
run: npm i -D esbuild-linux-64 | ||
|
||
- name: ⏬ Download foundations build | ||
uses: actions/download-artifact@v4 | ||
with: | ||
name: db-ui-foundations-build | ||
path: packages/foundations/build | ||
|
||
- name: ⏬ Download output | ||
uses: actions/download-artifact@v4 | ||
with: | ||
name: db-ui-output | ||
path: output | ||
|
||
- name: ⏬ Download components styles build | ||
uses: actions/download-artifact@v4 | ||
with: | ||
name: db-ui-components-build | ||
path: packages/components/build | ||
|
||
- name: ⏬ Download showcases | ||
uses: actions/download-artifact@v4 | ||
with: | ||
name: db-ui-showcases | ||
path: build-showcases | ||
|
||
- name: 👩🔬 Generate snapshots 🎭 | ||
env: | ||
HOME: /root | ||
run: | | ||
npm run regenerate:screenshots --workspace=@db-ui/react-components | ||
npm run regenerate:screenshots --workspace=@db-ui/foundations | ||
npm run regenerate:screenshots --workspace=react-showcase | ||
- name: 🆙 Upload snapshots | ||
uses: actions/upload-artifact@v4 | ||
with: | ||
name: __snapshots__ | ||
path: ./__snapshots__ | ||
retention-days: 30 |
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