Update VRT screenshots #24
Workflow file for this run
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
name: Update VRT screenshots | |
on: | |
workflow_dispatch: | |
env: | |
HUSKY: 0 | |
PLAYWRIGHT_SKIP_BROWSER_DOWNLOAD: 1 | |
TURBO_CACHE_DIR: .turbo | |
VRT_BROWSER: chromium | |
jobs: | |
test: | |
runs-on: ubuntu-latest | |
timeout-minutes: 15 | |
steps: | |
- name: Checkout repository | |
uses: actions/checkout@v4 | |
with: | |
lfs: 'true' | |
token: ${{ secrets.BOT_TOKEN }} | |
- name: Pull LFS files | |
run: git lfs pull | |
- name: Restore turbo cache | |
uses: actions/cache/restore@v3 | |
with: | |
path: ${{ env.TURBO_CACHE_DIR }} | |
key: ${{ runner.os }}-turbo-${{ github.sha }} | |
restore-keys: | | |
${{ runner.os }}-turbo- | |
- name: Use pnpm | |
uses: pnpm/action-setup@v2 | |
- name: Use Node.js | |
uses: actions/setup-node@v4 | |
with: | |
node-version-file: 'package.json' | |
cache: 'pnpm' | |
- name: Install dependencies | |
# change to pnpm ci once it is implemented | |
run: | | |
pnpm i --frozen-lockfile --loglevel warn | |
pnpm exec playwright install --with-deps ${{ env.VRT_BROWSER }} | |
- name: Run tests | |
run: pnpm run vrt-update --cache-dir="${{ env.TURBO_CACHE_DIR }}" | |
- name: Commit updated screenshots | |
run: | | |
git add -- **/vrt/screenshots/**/* | |
git config --local user.email "github-actions[bot]@users.noreply.github.com" | |
git config --local user.name "Github Actions [Bot]" | |
git commit -m "test: update vrt screenshots" | |
git push | |
- name: Upload report | |
uses: actions/upload-artifact@v4 | |
if: success() || failure() | |
with: | |
name: vrt-report | |
path: | | |
apps/*/vrt/report | |
packages/*/vrt/report | |
retention-days: 1 | |
- name: Save turbo cache | |
uses: actions/cache/save@v3 | |
if: success() || failure() | |
with: | |
path: ${{ env.TURBO_CACHE_DIR }} | |
key: ${{ runner.os }}-turbo-${{ github.sha }} |