mirror of
https://github.com/PeWu/topola-viewer.git
synced 2026-05-26 15:16:14 +00:00
Migrate from Cypress to Playwright
This commit is contained in:
29
.github/workflows/deploy-gh-pages.yml
vendored
29
.github/workflows/deploy-gh-pages.yml
vendored
@@ -18,7 +18,34 @@ jobs:
|
||||
- run: npm ci
|
||||
- run: npm run build
|
||||
- run: npm test
|
||||
- run: npm run cy:start-and-run
|
||||
- name: Get Playwright version
|
||||
id: playwright-version
|
||||
run: echo "version=$(node -p "require('@playwright/test/package.json').version")" >> $GITHUB_OUTPUT
|
||||
|
||||
- name: Cache Playwright Browsers
|
||||
id: cache-playwright
|
||||
uses: actions/cache@v4
|
||||
with:
|
||||
path: ~/.cache/ms-playwright
|
||||
key: playwright-${{ runner.os }}-${{ steps.playwright-version.outputs.version }}
|
||||
|
||||
- name: Install Playwright System Dependencies
|
||||
run: npx playwright install-deps chromium
|
||||
|
||||
- name: Install Playwright Browsers (If Not Cached)
|
||||
if: steps.cache-playwright.outputs.cache-hit != 'true'
|
||||
run: npx playwright install chromium
|
||||
|
||||
- name: Run E2E Tests
|
||||
run: npm run test:e2e
|
||||
|
||||
- name: Upload Playwright report
|
||||
if: always()
|
||||
uses: actions/upload-artifact@v4
|
||||
with:
|
||||
name: playwright-report-gh-pages
|
||||
path: playwright-report/
|
||||
retention-days: 30
|
||||
- name: Deploy
|
||||
run: |
|
||||
git remote set-url origin https://git:${GITHUB_TOKEN}@github.com/${GITHUB_REPOSITORY}.git
|
||||
|
||||
29
.github/workflows/deploy-wikitree-apps.yml
vendored
29
.github/workflows/deploy-wikitree-apps.yml
vendored
@@ -18,7 +18,34 @@ jobs:
|
||||
- run: npm ci
|
||||
- run: npm run build
|
||||
- run: npm test
|
||||
- run: npm run cy:start-and-run
|
||||
- name: Get Playwright version
|
||||
id: playwright-version
|
||||
run: echo "version=$(node -p "require('@playwright/test/package.json').version")" >> $GITHUB_OUTPUT
|
||||
|
||||
- name: Cache Playwright Browsers
|
||||
id: cache-playwright
|
||||
uses: actions/cache@v4
|
||||
with:
|
||||
path: ~/.cache/ms-playwright
|
||||
key: playwright-${{ runner.os }}-${{ steps.playwright-version.outputs.version }}
|
||||
|
||||
- name: Install Playwright System Dependencies
|
||||
run: npx playwright install-deps chromium
|
||||
|
||||
- name: Install Playwright Browsers (If Not Cached)
|
||||
if: steps.cache-playwright.outputs.cache-hit != 'true'
|
||||
run: npx playwright install chromium
|
||||
|
||||
- name: Run E2E Tests
|
||||
run: npm run test:e2e
|
||||
|
||||
- name: Upload Playwright report
|
||||
if: always()
|
||||
uses: actions/upload-artifact@v4
|
||||
with:
|
||||
name: playwright-report-wikitree
|
||||
path: playwright-report/
|
||||
retention-days: 30
|
||||
- name: Install lftp
|
||||
run: sudo apt-get install -y lftp
|
||||
- name: Set up ssh
|
||||
|
||||
37
.github/workflows/node.js.yml
vendored
37
.github/workflows/node.js.yml
vendored
@@ -28,10 +28,39 @@ jobs:
|
||||
cache: 'npm'
|
||||
- run: npm ci
|
||||
- name: Prettier Format Check
|
||||
run: |
|
||||
npm run prettier
|
||||
git diff --exit-code
|
||||
run: npx prettier --check "{src,tests}/**/*.{ts,tsx,json}"
|
||||
- run: npm run lint
|
||||
- run: npm run build
|
||||
- run: npm test
|
||||
- run: npm run cy:start-and-run
|
||||
|
||||
- name: Typecheck E2E Specs
|
||||
run: npx tsc -p tests/tsconfig.json --noEmit
|
||||
|
||||
- name: Get Playwright version
|
||||
id: playwright-version
|
||||
run: echo "version=$(node -p "require('@playwright/test/package.json').version")" >> $GITHUB_OUTPUT
|
||||
|
||||
- name: Cache Playwright Browsers
|
||||
id: cache-playwright
|
||||
uses: actions/cache@v4
|
||||
with:
|
||||
path: ~/.cache/ms-playwright
|
||||
key: playwright-${{ runner.os }}-${{ steps.playwright-version.outputs.version }}
|
||||
|
||||
- name: Install Playwright System Dependencies
|
||||
run: npx playwright install-deps chromium
|
||||
|
||||
- name: Install Playwright Browsers (If Not Cached)
|
||||
if: steps.cache-playwright.outputs.cache-hit != 'true'
|
||||
run: npx playwright install chromium
|
||||
|
||||
- name: Run E2E Tests
|
||||
run: npm run test:e2e
|
||||
|
||||
- name: Upload Playwright report
|
||||
if: always()
|
||||
uses: actions/upload-artifact@v4
|
||||
with:
|
||||
name: playwright-report-${{ matrix.node-version }}
|
||||
path: playwright-report/
|
||||
retention-days: 30
|
||||
|
||||
Reference in New Issue
Block a user