Playwright + Native Node Test Runner (#3893)

This commit is contained in:
Louis Lam
2023-12-17 19:02:22 +08:00
committed by GitHub
parent f24c3583fb
commit 996ff28ed9
23 changed files with 1611 additions and 5073 deletions

View File

@@ -15,7 +15,7 @@ on:
jobs:
auto-test:
needs: [ check-linters ]
needs: [ check-linters, e2e-test ]
runs-on: ${{ matrix.os }}
timeout-minutes: 15
@@ -36,7 +36,7 @@ jobs:
- run: npm install npm@9 -g
- run: npm install
- run: npm run build
- run: npm test
- run: npm run test-backend
env:
HEADLESS_TEST: 1
JUST_FOR_TEST: ${{ secrets.JUST_FOR_TEST }}
@@ -78,33 +78,18 @@ jobs:
- run: npm install
- run: npm run lint:prod
# TODO: Temporarily disable, as it cannot pass the test in 2.0.0 yet
# e2e-tests:
# needs: [ check-linters ]
# runs-on: ubuntu-latest
# steps:
# - run: git config --global core.autocrlf false # Mainly for Windows
# - uses: actions/checkout@v4
#
# - name: Use Node.js 14
# uses: actions/setup-node@v4
# with:
# node-version: 14
# - run: npm install
# - run: npm run build
# - run: npm run cy:test
frontend-unit-tests:
e2e-test:
needs: [ check-linters ]
runs-on: ubuntu-latest
runs-on: ARM64
steps:
- run: git config --global core.autocrlf false # Mainly for Windows
- uses: actions/checkout@v4
- name: Use Node.js 14
- name: Use Node.js 20
uses: actions/setup-node@v4
with:
node-version: 14
node-version: 20
- run: npm install
- run: npx playwright install
- run: npm run build
- run: npm run cy:run:unit
- run: npm run test-e2e