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: e2e | |
on: | |
deployment_status: | |
jobs: | |
run-e2e: | |
name: Playwright testing deployment ${{ github.event.deployment_status.target_url }} | |
if: github.event_name == 'deployment_status' && github.event.deployment_status.state == 'success' && !contains(github.event.deployment_status.target_url, 'frontends-docs') | |
runs-on: macos-14 | |
env: | |
TURBO_TOKEN: ${{ secrets.TURBO_TOKEN }} | |
TURBO_TEAM: ${{ secrets.TURBO_TEAM }} | |
steps: | |
- name: Check out code | |
uses: actions/checkout@v4 | |
- name: Install Node.js | |
uses: actions/setup-node@v4 | |
with: | |
node-version: 20 | |
- run: corepack enable | |
- run: pnpm --version | |
- uses: actions/setup-node@v4 | |
with: | |
node-version: 20 | |
cache: "pnpm" | |
cache-dependency-path: "**/pnpm-lock.yaml" | |
- name: install | |
run: pnpm install --frozen-lockfile --prefer-offline | |
- name: Install dependencies with Playwright | |
run: | | |
pnpm playwright install --with-deps | |
- name: create env file | |
run: | | |
touch .env | |
echo BASE_E2E_URL=${{ github.event.deployment_status.target_url }} >> .env | |
- name: Run tests | |
run: pnpm run test:e2e | |
- name: Upload artifacts | |
uses: actions/upload-artifact@v4 | |
if: ${{ failure() }} | |
with: | |
name: reports | |
path: apps/e2e-tests/reports/ | |
retention-days: 7 |