mirror of
https://github.com/TriliumNext/Notes.git
synced 2025-07-27 18:12:29 +08:00
chore(nx/e2e): use generated playwright workflow
This commit is contained in:
parent
e0002078b7
commit
d31fa7a6cd
56
.github/workflows/playwright.yml
vendored
56
.github/workflows/playwright.yml
vendored
@ -1,28 +1,46 @@
|
|||||||
name: Playwright Tests
|
name: playwright
|
||||||
|
|
||||||
on:
|
on:
|
||||||
push:
|
push:
|
||||||
branches: [ develop ]
|
branches:
|
||||||
|
- master
|
||||||
pull_request:
|
pull_request:
|
||||||
branches: [ develop ]
|
|
||||||
|
permissions:
|
||||||
|
actions: read
|
||||||
|
contents: read
|
||||||
|
|
||||||
jobs:
|
jobs:
|
||||||
test:
|
main:
|
||||||
timeout-minutes: 60
|
|
||||||
runs-on: ubuntu-latest
|
runs-on: ubuntu-latest
|
||||||
steps:
|
steps:
|
||||||
- uses: actions/checkout@v4
|
- uses: actions/checkout@v4
|
||||||
- uses: pnpm/action-setup@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
|
- uses: actions/setup-node@v4
|
||||||
with:
|
with:
|
||||||
node-version: lts/*
|
node-version: 20
|
||||||
- name: Install dependencies
|
cache: 'npm'
|
||||||
run: pnpm install --frozen-lockfile
|
|
||||||
- name: Install Playwright Browsers
|
- run: npm ci --legacy-peer-deps
|
||||||
run: npx playwright install --with-deps
|
- run: npx playwright install --with-deps
|
||||||
- name: Run Playwright tests
|
- uses: nrwl/nx-set-shas@v4
|
||||||
run: npx playwright test
|
|
||||||
- uses: actions/upload-artifact@v4
|
# Prepend any command with "nx-cloud record --" to record its logs to Nx Cloud
|
||||||
if: ${{ !cancelled() }}
|
# - run: npx nx-cloud record -- echo Hello World
|
||||||
with:
|
# Nx Affected runs only tasks affected by the changes in this PR/commit. Learn more: https://nx.dev/ci/features/affected
|
||||||
name: playwright-report
|
# When you enable task distribution, run the e2e-ci task instead of e2e
|
||||||
path: playwright-report/
|
- run: npx nx affected -t lint test build e2e
|
||||||
retention-days: 30
|
|
||||||
|
3
nx.json
3
nx.json
@ -15,7 +15,8 @@
|
|||||||
"!{projectRoot}/src/test-setup.[jt]s"
|
"!{projectRoot}/src/test-setup.[jt]s"
|
||||||
],
|
],
|
||||||
"sharedGlobals": [
|
"sharedGlobals": [
|
||||||
"{workspaceRoot}/.github/workflows/release.yml"
|
"{workspaceRoot}/.github/workflows/release.yml",
|
||||||
|
"{workspaceRoot}/.github/workflows/playwright.yml"
|
||||||
]
|
]
|
||||||
},
|
},
|
||||||
"plugins": [
|
"plugins": [
|
||||||
|
Loading…
x
Reference in New Issue
Block a user