diff --git a/.github/workflows/playwright.yml b/.github/workflows/playwright.yml index 0925edad..90349ef6 100644 --- a/.github/workflows/playwright.yml +++ b/.github/workflows/playwright.yml @@ -1,27 +1,39 @@ name: Playwright Tests on: push: - branches: [ main, master ] + branches: + - "*" + pull_request: - branches: [ main, master ] + branches: + - "*" jobs: test: - timeout-minutes: 60 - runs-on: macos-latest + runs-on: ubuntu-latest + timeout-minutes: 15 steps: - - uses: actions/checkout@v4 - - uses: actions/setup-node@v4 - with: - node-version: lts/* - - name: Install dependencies - run: npm install - - name: Install Playwright Browsers - run: npx playwright install --with-deps - - name: Run Playwright tests - run: npx playwright test - - uses: actions/upload-artifact@v4 - if: always() - with: - name: playwright-report - path: playwright-report/ - retention-days: 30 + - name: Checkout + uses: actions/checkout@v4 + + - name: Set up Node + uses: actions/setup-node@v4 + with: + cache: pnpm + node-version-file: .nvmrc + check-latest: true + + - name: Install deps + run: | + npm install + npx playwright install --with-deps + + - name: Test + run: npx playwright test --ignore-snapshots + + - name: Upload Playwright Report + uses: actions/upload-artifact@v4 + if: always() + with: + name: playwright-report + path: playwright-report/ + retention-days: 30