chore: split e2e & unit test

This commit is contained in:
DarkSky 2023-02-05 18:56:50 +08:00
parent 65652d0d06
commit 3e5b135ceb

View File

@ -5,17 +5,13 @@ on:
pull_request:
branches: [master]
jobs:
test:
e2e-test:
timeout-minutes: 60
runs-on: ubuntu-latest
runs-on: self-hosted
steps:
- uses: actions/checkout@v3
- uses: pnpm/action-setup@v2
with:
version: 'latest'
- uses: actions/setup-node@v3
with:
node-version: 16
@ -23,6 +19,10 @@ jobs:
scope: '@toeverything'
cache: 'pnpm'
- uses: pnpm/action-setup@v2
with:
version: 'latest'
- run: node scripts/module-resolve/ci.cjs
- name: Install dependencies
@ -53,5 +53,33 @@ jobs:
name: affine
fail_ci_if_error: true
unit-test:
timeout-minutes: 60
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v3
- uses: actions/setup-node@v3
with:
node-version: 16
registry-url: https://npm.pkg.github.com
scope: '@toeverything'
cache: 'pnpm'
- uses: pnpm/action-setup@v2
with:
version: 'latest'
- run: node scripts/module-resolve/ci.cjs
- name: Install dependencies
run: pnpm install --no-frozen-lockfile
env:
NODE_AUTH_TOKEN: ${{ secrets.NPM_GITHUB_AUTH_TOKEN }}
- name: Install Playwright browsers
run: npx playwright install chromium
- name: Run Unit tests
run: pnpm run test:unit