Skip to content

Commit

Permalink
ci(vrt): fix
Browse files Browse the repository at this point in the history
  • Loading branch information
ssssota committed May 4, 2024
1 parent 87a4eec commit d05090e
Showing 1 changed file with 13 additions and 12 deletions.
25 changes: 13 additions & 12 deletions .github/workflows/vrt.yml
Original file line number Diff line number Diff line change
@@ -1,38 +1,39 @@
name: CI
name: VRT
on:
push:
branches:
- main
pull_request:
jobs:
check:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v4
- uses: ./.github/actions/setup
- run: npx playwright install --with-deps
- run: pnpm test
update-snapshot:
needs: [check]
runs-on: ubuntu-latest
defaults:
run:
working-directory: site
steps:
- uses: actions/checkout@v4
- uses: ./.github/actions/setup
- run: pnpm -w build
- run: npx playwright install --with-deps
- run: npx playwright test --update-snapshots
- run: gi add -N .; git diff --name-only --exit-code
- run: npx playwright test
id: test
continue-on-error: true

- if: steps.test.outcome == 'failure'
run: npx playwright test --update-snapshots
- if: steps.test.outcome == 'failure'
run: gi add -N .; git diff --name-only --exit-code
id: git-diff
continue-on-error: true
- if: steps.git-diff.outcome == 'failure'
run: |
set -x
gh pr checkout ${{ github.event.number }}
git remote set-url origin https://github-actions:${GITHUB_TOKEN}@github.com/${GITHUB_REPOSITORY}
git config --global user.email "github-actions[bot]@users.noreply.github.com"
git config --global user.name "github-actions[bot]"
git commit -am "chore: update snapshots"
git add .
git commit -m "chore: update snapshots"
git pull --rebase
git push
env:
Expand Down

0 comments on commit d05090e

Please sign in to comment.