diff --git a/.github/workflows/test-enjoy-app.yml b/.github/workflows/test-enjoy-app.yml index 87fb3781..88a35156 100644 --- a/.github/workflows/test-enjoy-app.yml +++ b/.github/workflows/test-enjoy-app.yml @@ -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() diff --git a/enjoy/package.json b/enjoy/package.json index 069fe5de..a2ff74ff 100644 --- a/enjoy/package.json +++ b/enjoy/package.json @@ -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", diff --git a/package.json b/package.json index 33fb35ed..e841f090 100644 --- a/package.json +++ b/package.json @@ -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",