chore: bump to next/react rc version #115
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: Playwright Tests | |
on: | |
push: | |
branches: [main, master] | |
pull_request: | |
branches: [main, master] | |
jobs: | |
test: | |
timeout-minutes: 60 | |
runs-on: ubuntu-latest | |
steps: | |
- uses: actions/checkout@v4 | |
- uses: pnpm/action-setup@v3 | |
with: | |
version: 9 | |
- uses: actions/setup-node@v4 | |
with: | |
node-version: 20 | |
cache: "pnpm" | |
- run: pnpm install --frozen-lockfile | |
- name: Store Playwright's Version | |
run: | | |
PLAYWRIGHT_VERSION=$(pnpm ls @playwright/test --json | jq -r '.[0].devDependencies["@playwright/test"].version') | |
echo "Playwright's Version: $PLAYWRIGHT_VERSION" | |
echo "PLAYWRIGHT_VERSION=$PLAYWRIGHT_VERSION" >> $GITHUB_ENV | |
- name: Cache Playwright Browsers for Playwright's Version | |
id: cache-playwright-browsers | |
uses: actions/cache@v4 | |
with: | |
path: ~/.cache/ms-playwright | |
key: playwright-browsers-${{ env.PLAYWRIGHT_VERSION }} | |
- name: Cache Next.js Build | |
uses: actions/cache@v4 | |
with: | |
path: .next | |
key: nextjs-${{ runner.os }}-${{ hashFiles('**/pnpm-lock.yaml') }} | |
- name: Setup Playwright | |
run: pnpm exec playwright install --with-deps | |
- name: Run Playwright tests | |
run: JWT_SECRET=$(openssl rand -hex 32) pnpm test | |
env: | |
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }} | |
- uses: actions/upload-artifact@v4 | |
if: always() | |
with: | |
name: playwright-report | |
path: playwright-report/ | |
retention-days: 30 |