Update Playwright Screenshots #8
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
on: [workflow_dispatch] | |
name: Update Playwright Screenshots | |
jobs: | |
test: | |
timeout-minutes: 60 | |
runs-on: ubuntu-latest | |
steps: | |
- uses: actions/checkout@v3 | |
- uses: actions/setup-node@v3 | |
with: | |
node-version: "20" | |
- name: allow write in work dir | |
run: sudo chmod -R 777 . | |
- name: Install Dependencies | |
run: | | |
npm -g install pnpm | |
pnpm install | |
pnpm build | |
pnpm playwright install-deps | |
pnpm playwright install firefox | |
- name: Run Playwright tests | |
run: pnpm playwright test --update-snapshots | |
- name: Create commit | |
env: | |
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }} | |
run: | | |
git config user.email "[email protected]" | |
git config user.name "github-actions" | |
git add ./src/__tests__/**/*.png | |
git commit -m "update: playwright screenshots" -n | |
git push |