Playwright Tests #7
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: Playwright Tests | |
on: | |
deployment_status: | |
jobs: | |
run-e2es: | |
if: github.event_name == 'deployment_status' && github.event.deployment_status.state == 'success' | |
name: Run Playwright Tests | |
runs-on: ubuntu-latest | |
steps: | |
- name: Checkout repository | |
uses: actions/checkout@v4 | |
with: | |
fetch-depth: 0 | |
- name: Install pnpm | |
uses: pnpm/[email protected] | |
with: | |
version: 8 | |
- name: Set up Node | |
uses: actions/setup-node@v4 | |
with: | |
node-version: lts/* | |
cache: 'pnpm' | |
- name: Cache Playwright Binaries | |
uses: actions/cache@v4 | |
id: playwright-cache | |
with: | |
path: | | |
~/.cache/ms-playwright | |
key: ${{ runner.os }}-playwright-1.48.1 | |
- name: Install dependencies | |
run: pnpm install --frozen-lockfile | |
- name: Install Playwright Browsers | |
run: pnpx [email protected] install --with-deps chromium | |
if: steps.playwright-cache.outputs.cache-hit != 'true' | |
- name: Run Playwright tests | |
env: | |
BASE_URL: ${{ github.event.deployment_status.environment_url }} | |
CI: true | |
run: pnpm exec playwright test | |
- name: Upload test results | |
uses: actions/upload-artifact@v4 | |
with: | |
name: playwright-report | |
path: playwright-report/ | |
retention-days: 30 |