mirror of
https://github.com/jo-inc/camofox-browser.git
synced 2026-10-02 04:14:41 +08:00
- Run reporter.test.js with node --test (uses node:test, not Jest) - Exclude reporter.test from Jest run - Bump client timeout to 60s in CI (Camoufox cold start on GitHub runners) - Disable bail so full suite runs even on failure
41 lines
955 B
YAML
41 lines
955 B
YAML
name: CI
|
|
|
|
on:
|
|
push:
|
|
branches: [master]
|
|
pull_request:
|
|
branches: [master]
|
|
|
|
jobs:
|
|
test:
|
|
runs-on: ubuntu-latest
|
|
strategy:
|
|
matrix:
|
|
node-version: [20, 24]
|
|
|
|
steps:
|
|
- uses: actions/checkout@v4
|
|
|
|
- name: Setup Node.js ${{ matrix.node-version }}
|
|
uses: actions/setup-node@v4
|
|
with:
|
|
node-version: ${{ matrix.node-version }}
|
|
cache: npm
|
|
|
|
- name: Install dependencies and browser
|
|
run: |
|
|
npm ci
|
|
npm install --no-save jest-junit
|
|
npx playwright install --with-deps firefox
|
|
|
|
- name: Run tests (node:test)
|
|
run: node --test tests/unit/reporter.test.js
|
|
|
|
- name: Run tests (Jest + browser)
|
|
run: |
|
|
xvfb-run --auto-servernum \
|
|
node --experimental-vm-modules node_modules/.bin/jest --runInBand --forceExit \
|
|
--testPathIgnorePatterns="live|reporter\.test"
|
|
env:
|
|
CI: true
|