Migrate to pnpm #416
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: "vrt" | |
on: | |
pull_request: | |
branches: | |
- main | |
jobs: | |
vrt: | |
timeout-minutes: 15 | |
env: | |
SERVER_ENV: local | |
AWS_REGION: auto # Cloudflare R2's region should be `auto`. | |
AWS_ACCESS_KEY_ID: ${{ secrets.CLOUDFLARE_R2_ACCESS_KEY_ID }} | |
AWS_SECRET_ACCESS_KEY: ${{ secrets.CLOUDFLARE_R2_SECRET_ACCESS_KEY }} | |
REG_SUIT_GITHUB_CLIENT_ID: ${{ secrets.REG_SUIT_GITHUB_CLIENT_ID }} | |
HASH_PR: ${{ github.event.pull_request.head.sha }} | |
runs-on: ubuntu-latest | |
steps: | |
- uses: actions/checkout@v4 | |
with: | |
# See: https://github.com/actions/checkout#checkout-pull-request-head-commit-instead-of-merge-commit | |
ref: ${{ github.event.pull_request.head.sha }} | |
- uses: pnpm/action-setup@v4 | |
- uses: actions/setup-node@v4 | |
with: | |
node-version: 22 | |
cache: pnpm | |
- name: cache playwright browsers | |
id: playwright-cache | |
uses: actions/cache@v4 | |
with: | |
path: ~/.cache/ms-playwright | |
key: playwright-${{ hashFiles('**/package-lock.json') }} | |
- run: pnpm ci | |
- name: install system dependencies for Playwright | |
run: pnpm exec playwright install-deps chromium | |
- run: pnpm run build | |
- run: pnpm run vrt |