chore(nx/e2e): use generated playwright workflow

This commit is contained in:
Elian Doran 2025-04-29 10:01:07 +03:00
parent e0002078b7
commit d31fa7a6cd
No known key found for this signature in database
2 changed files with 42 additions and 23 deletions

View File

@ -1,28 +1,46 @@
name: Playwright Tests
name: playwright
on:
push:
branches: [ develop ]
branches:
- master
pull_request:
branches: [ develop ]
permissions:
actions: read
contents: read
jobs:
test:
timeout-minutes: 60
main:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v4
- uses: pnpm/action-setup@v4
- uses: actions/setup-node@v4
with:
node-version: lts/*
- name: Install dependencies
run: pnpm install --frozen-lockfile
- name: Install Playwright Browsers
run: npx playwright install --with-deps
- name: Run Playwright tests
run: npx playwright test
- uses: actions/upload-artifact@v4
if: ${{ !cancelled() }}
with:
name: playwright-report
path: playwright-report/
retention-days: 30
- uses: actions/checkout@v4
with:
filter: tree:0
fetch-depth: 0
# This enables task distribution via Nx Cloud
# Run this command as early as possible, before dependencies are installed
# Learn more at https://nx.dev/ci/reference/nx-cloud-cli#npx-nxcloud-startcirun
# Connect your workspace by running "nx connect" and uncomment this line to enable task distribution
# - run: npx nx-cloud start-ci-run --distribute-on="3 linux-medium-js" --stop-agents-after="e2e-ci"
# Cache node_modules
- uses: actions/setup-node@v4
with:
node-version: 20
cache: 'npm'
- run: npm ci --legacy-peer-deps
- run: npx playwright install --with-deps
- uses: nrwl/nx-set-shas@v4
# Prepend any command with "nx-cloud record --" to record its logs to Nx Cloud
# - run: npx nx-cloud record -- echo Hello World
# Nx Affected runs only tasks affected by the changes in this PR/commit. Learn more: https://nx.dev/ci/features/affected
# When you enable task distribution, run the e2e-ci task instead of e2e
- run: npx nx affected -t lint test build e2e

View File

@ -15,7 +15,8 @@
"!{projectRoot}/src/test-setup.[jt]s"
],
"sharedGlobals": [
"{workspaceRoot}/.github/workflows/release.yml"
"{workspaceRoot}/.github/workflows/release.yml",
"{workspaceRoot}/.github/workflows/playwright.yml"
]
},
"plugins": [