mirror of
https://github.com/4gray/iptvnator.git
synced 2026-10-08 17:06:15 -08:00
feat(ci): add cross-platform E2E workflow and remove old CI
Add a new GitHub Actions workflow "Cross-Platform E2E Tests" that runs end-to-end tests on linux, macOS, and Windows using a matrix job. The workflow checks out code, sets up Node.js 22 with npm cache, installs deps, builds the backend, installs Playwright browsers, and runs the electron-backend-e2e suite (using xvfb on Linux). Failed test artifacts (Playwright report) are uploaded per OS for 7 days. Remove the previous monolithic 'Build and Test' workflow which included unit tests, coverage upload, and an older E2E configuration. This consolidates E2E across platforms into a focused, cross-platform job and simplifies the CI surface by deprecating the outdated workflow.
This commit is contained in:
1 parent
e8a80fdb60
commit
6cd0c1fa66
2 files changed
+63
-89
No files matched your search
@@ -0,0 +1,63 @@
|
||||
name: 'Cross-Platform E2E Tests'
|
||||
|
||||
on:
|
||||
push:
|
||||
branches:
|
||||
- nx
|
||||
pull_request:
|
||||
branches:
|
||||
- nx
|
||||
|
||||
jobs:
|
||||
e2e-tests:
|
||||
name: E2E on ${{ matrix.os }}
|
||||
runs-on: ${{ matrix.os }}
|
||||
env:
|
||||
NX_SKIP_NX_CACHE: true
|
||||
strategy:
|
||||
fail-fast: false
|
||||
matrix:
|
||||
os: [ubuntu-latest, macos-latest, windows-latest]
|
||||
|
||||
steps:
|
||||
- uses: actions/checkout@v4
|
||||
|
||||
- name: Install pnpm
|
||||
uses: pnpm/action-setup@v4
|
||||
with:
|
||||
version: 10
|
||||
|
||||
- name: Setup Node.js
|
||||
uses: actions/setup-node@v4
|
||||
with:
|
||||
node-version: '22'
|
||||
cache: 'pnpm'
|
||||
|
||||
- name: Install Dependencies
|
||||
run: pnpm install
|
||||
|
||||
- name: Build Backend
|
||||
run: npx nx build electron-backend
|
||||
|
||||
- name: Install Playwright Browsers
|
||||
run: npx playwright install --with-deps
|
||||
|
||||
- name: Run E2E Tests (Linux)
|
||||
if: runner.os == 'Linux'
|
||||
run: xvfb-run --auto-servernum --server-args="-screen 0 1280x960x24" npx nx run electron-backend-e2e:e2e
|
||||
env:
|
||||
CI: true
|
||||
|
||||
- name: Run E2E Tests (Windows/Mac)
|
||||
if: runner.os != 'Linux'
|
||||
run: npx nx run electron-backend-e2e:e2e
|
||||
env:
|
||||
CI: true
|
||||
|
||||
- name: Upload Test Results
|
||||
if: failure()
|
||||
uses: actions/upload-artifact@v4
|
||||
with:
|
||||
name: playwright-report-${{ matrix.os }}
|
||||
path: dist/playwright-report/electron-backend-e2e/
|
||||
retention-days: 7
|
||||
Reference in new issue
Block a user