update test config (#430)

This commit is contained in:
an-lee
2024-03-21 16:18:10 +08:00
committed by GitHub
parent 77f0cc10db
commit 3000a63ca8
3 changed files with 22 additions and 4 deletions

View File

@@ -39,14 +39,28 @@ jobs:
brew update
brew install sdl2
- name: Run tests with xvfb-run on Ubuntu
- name: Package App
run: yarn enjoy:package
- name: Run main tests with xvfb-run on Ubuntu
if: contains(matrix.os, 'ubuntu')
run: |
xvfb-run --auto-servernum --server-args="-screen 0 1280x960x24" -- yarn enjoy:test
xvfb-run --auto-servernum --server-args="-screen 0 1280x960x24" -- yarn enjoy:test:main
- name: Run tests on macOS or Windows
- name: Run main tests on macOS or Windows
if: contains(matrix.os, 'macos') || contains(matrix.os, 'windows')
run: yarn enjoy:test
run: yarn enjoy:test:main
- name: Run renderer tests with xvfb-run on Ubuntu
if: contains(matrix.os, 'ubuntu')
continue-on-error: true
run: |
xvfb-run --auto-servernum --server-args="-screen 0 1280x960x24" -- yarn enjoy:test:renderer
- name: Run renderer tests on macOS or Windows
if: contains(matrix.os, 'macos') || contains(matrix.os, 'windows')
continue-on-error: true
run: yarn enjoy:test:renderer
- uses: actions/upload-artifact@v4
if: always()

View File

@@ -16,6 +16,8 @@
"publish": "rimraf .vite && yarn run download && electron-forge publish",
"lint": "eslint --ext .ts,.tsx .",
"test": "yarn run package && playwright test",
"test:main": "yarn run playwright test e2e/main.spec.ts",
"test:renderer": "yarn run playwright test e2e/renderer.spec.ts",
"create-migration": "zx ./src/main/db/create-migration.mjs",
"download-whisper-model": "zx ./scripts/download-whisper-model.mjs",
"download-ffmpeg-wasm": "zx ./scripts/download-ffmpeg-wasm.mjs",

View File

@@ -9,6 +9,8 @@
"enjoy:dev": "yarn workspace enjoy dev",
"enjoy:start": "yarn workspace enjoy start",
"enjoy:test": "yarn workspace enjoy test",
"enjoy:test:main": "yarn workspace enjoy test:main",
"enjoy:test:renderer": "yarn workspace enjoy test:renderer",
"enjoy:package": "yarn workspace enjoy package",
"enjoy:make": "yarn workspace enjoy make",
"enjoy:publish": "yarn workspace enjoy publish",