mirror of
https://github.com/toeverything/AFFiNE.git
synced 2024-12-28 11:02:59 +03:00
chore: split e2e & unit test
This commit is contained in:
parent
65652d0d06
commit
3e5b135ceb
40
.github/workflows/tests.yml
vendored
40
.github/workflows/tests.yml
vendored
@ -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
|
||||
|
Loading…
Reference in New Issue
Block a user