mirror of
https://github.com/4gray/iptvnator.git
synced 2026-10-08 17:06:15 -08:00
Supersedes #1249, #1245 and #1247, which each rewrote the full-commit pins in publish-snap.yaml while the same SHAs are asserted in three packaging test files — merged separately, every one of them left those tests red. actions/checkout v4 -> v7 (docker.yml from v6), actions/upload-artifact v4 -> v7, actions/download-artifact v4 -> v8. New pins verified against the upstream tag refs: checkout 3d3c42e5 = v7.0.1, upload-artifact 043fb46d = v7.0.1, download-artifact 3e5f45b2 = v8.0.1. download-artifact v8 changes two things on the Snap publish path, both in our favour: a digest mismatch now fails the run instead of logging a warning, and decompression is skipped for non-zip Content-Types (our artifact is a normal upload-artifact zip, so unchanged). checkout v7's fork-PR block only applies to pull_request_target/workflow_run, neither of which exists here.
142 lines
4.3 KiB
YAML
142 lines
4.3 KiB
YAML
name: 'Cross-Platform E2E Tests'
|
|
|
|
on:
|
|
push:
|
|
branches:
|
|
- master
|
|
paths-ignore:
|
|
- '**/*.md'
|
|
- 'docs/**'
|
|
- '.plans/**'
|
|
- '.codex/**'
|
|
- '.claude/**'
|
|
- 'apps/website/**'
|
|
pull_request:
|
|
branches:
|
|
- master
|
|
paths-ignore:
|
|
- '**/*.md'
|
|
- 'docs/**'
|
|
- '.plans/**'
|
|
- '.codex/**'
|
|
- '.claude/**'
|
|
- 'apps/website/**'
|
|
workflow_dispatch:
|
|
|
|
# Superseded PR pushes cancel their still-running E2E matrix (the most
|
|
# expensive per-PR runner time). Non-PR runs get a unique group (run_id):
|
|
# GitHub keeps at most one pending run per group even with
|
|
# cancel-in-progress: false, so a shared ref group could silently drop a
|
|
# queued master run between two rapid pushes.
|
|
concurrency:
|
|
group: ${{ github.workflow }}-${{ github.event.pull_request.number || github.run_id }}
|
|
cancel-in-progress: ${{ github.event_name == 'pull_request' }}
|
|
|
|
permissions:
|
|
contents: read
|
|
|
|
jobs:
|
|
electron-e2e-tests:
|
|
name: Electron E2E on ${{ matrix.os }}
|
|
runs-on: ${{ matrix.os }}
|
|
timeout-minutes: 45
|
|
env:
|
|
IPTVNATOR_ALLOW_PRIVATE_NETWORK_URLS: '1'
|
|
NX_SKIP_NX_CACHE: true
|
|
strategy:
|
|
fail-fast: false
|
|
matrix:
|
|
os: [ubuntu-latest, macos-latest, windows-latest]
|
|
|
|
steps:
|
|
- uses: actions/checkout@v7
|
|
|
|
- name: Install pnpm
|
|
uses: pnpm/action-setup@v4
|
|
|
|
- name: Setup Node.js
|
|
uses: actions/setup-node@v4
|
|
with:
|
|
node-version: '22'
|
|
cache: 'pnpm'
|
|
|
|
- name: Install Dependencies
|
|
run: pnpm install --frozen-lockfile
|
|
|
|
- name: Build Backend
|
|
run: pnpm nx build electron-backend
|
|
|
|
- name: Install Playwright Browsers
|
|
run: pnpm exec playwright install --with-deps
|
|
|
|
- name: Run Electron E2E Tests (Linux)
|
|
if: runner.os == 'Linux'
|
|
run: xvfb-run --auto-servernum --server-args="-screen 0 1280x960x24" pnpm nx run electron-backend-e2e:e2e
|
|
env:
|
|
CI: true
|
|
|
|
- name: Run Electron E2E Tests (Windows/Mac)
|
|
if: runner.os != 'Linux'
|
|
run: pnpm nx run electron-backend-e2e:e2e
|
|
env:
|
|
CI: true
|
|
|
|
- name: Summarize Electron E2E semantic coverage
|
|
if: always()
|
|
run: pnpm run coverage:e2e:summary -- --project=electron-backend-e2e
|
|
|
|
- name: Upload Electron Test Results
|
|
if: always()
|
|
uses: actions/upload-artifact@v7
|
|
with:
|
|
name: playwright-report-electron-${{ matrix.os }}
|
|
path: |
|
|
dist/playwright-report/electron-backend-e2e/
|
|
dist/test-results/electron-backend-e2e/
|
|
coverage/e2e/
|
|
retention-days: 7
|
|
|
|
web-e2e-tests:
|
|
name: Web E2E on Ubuntu Chromium
|
|
runs-on: ubuntu-latest
|
|
env:
|
|
NX_SKIP_NX_CACHE: true
|
|
|
|
steps:
|
|
- uses: actions/checkout@v7
|
|
|
|
- name: Install pnpm
|
|
uses: pnpm/action-setup@v4
|
|
|
|
- name: Setup Node.js
|
|
uses: actions/setup-node@v4
|
|
with:
|
|
node-version: '22'
|
|
cache: 'pnpm'
|
|
|
|
- name: Install Dependencies
|
|
run: pnpm install --frozen-lockfile
|
|
|
|
- name: Install Chromium
|
|
run: pnpm exec playwright install --with-deps chromium
|
|
|
|
- name: Run Web E2E Tests
|
|
run: pnpm nx run web-e2e:e2e -- --project=chromium
|
|
env:
|
|
CI: true
|
|
|
|
- name: Summarize Web E2E semantic coverage
|
|
if: always()
|
|
run: pnpm run coverage:e2e:summary -- --project=web-e2e
|
|
|
|
- name: Upload Web Test Results
|
|
if: always()
|
|
uses: actions/upload-artifact@v7
|
|
with:
|
|
name: playwright-report-web-ubuntu
|
|
path: |
|
|
dist/playwright-report/web-e2e/
|
|
dist/test-results/web-e2e/
|
|
coverage/e2e/
|
|
retention-days: 7
|