name: Playwright Tests on: workflow_dispatch: permissions: contents: read concurrency: group: playwright-${{ github.workflow }}-${{ github.ref }} cancel-in-progress: true jobs: test: timeout-minutes: 30 runs-on: ubuntu-22.04 env: AUTH_SECRET: ${{ secrets.AUTH_SECRET }} POSTGRES_URL: ${{ secrets.POSTGRES_URL }} BLOB_READ_WRITE_TOKEN: ${{ secrets.BLOB_READ_WRITE_TOKEN }} REDIS_URL: ${{ secrets.REDIS_URL }} steps: - uses: actions/checkout@v4 with: fetch-depth: 1 - uses: actions/setup-node@v4 with: node-version: 20 cache: "pnpm" - name: Install pnpm uses: pnpm/action-setup@v4 with: version: 9.12.3 run_install: false - name: Install dependencies run: pnpm install --frozen-lockfile - name: Cache Playwright browsers uses: actions/cache@v4 id: playwright-cache with: path: ~/.cache/ms-playwright key: ${{ runner.os }}-playwright-${{ hashFiles('**/pnpm-lock.yaml') }} - name: Install Playwright Browsers if: steps.playwright-cache.outputs.cache-hit != 'true' run: pnpm exec playwright install --with-deps chromium - name: Run Playwright tests run: pnpm test - uses: actions/upload-artifact@v4 if: always() && !cancelled() with: name: playwright-report path: playwright-report/ retention-days: 7