-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
ci: π€ add workflow to update snapshots (#8)
- Loading branch information
Showing
1 changed file
with
41 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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,41 @@ | ||
name: π Update Snapshots | ||
on: | ||
- workflow_dispatch | ||
|
||
env: | ||
# Using Nx Cloud is safer | ||
NX_REJECT_UNKNOWN_LOCAL_CACHE: 0 | ||
|
||
jobs: | ||
update-snapshots: | ||
name: π Update Snapshots | ||
runs-on: ubuntu-latest | ||
steps: | ||
- uses: actions/checkout@v4 | ||
with: | ||
fetch-depth: 0 | ||
- uses: actions/setup-node@v3 | ||
with: | ||
node-version: 22 | ||
- uses: oven-sh/setup-bun@v1 | ||
with: | ||
bun-version: latest | ||
- name: Install Playwright Browsers | ||
run: bun playwright chrome --with-deps | ||
- run: bun install --frozen-lockfile --ignore-scripts | ||
- uses: nrwl/nx-set-shas@v4 | ||
|
||
- run: bun nx affected e2e -u | ||
|
||
- run: | | ||
git config --global user.email "[email protected]" | ||
git config --global user.name "Marmicode Bot" | ||
git diff --cached --quiet || git commit -a -m "test: β update snapshots" | ||
git push | ||
- uses: actions/upload-artifact@v4 | ||
if: ${{ !cancelled() }} | ||
with: | ||
name: playwright-report | ||
path: dist/.playwright/apps/cookbook/playwright-report/ | ||
retention-days: 30 |