name: ci on: push: branches: [main] pull_request: branches: [main] workflow_dispatch: jobs: test: name: ${{ matrix.os }} / node ${{ matrix.node }} runs-on: ${{ matrix.os }} # the input-layer suite (test/input.test.js) starts real daemons and drives real input: ~7 min locally timeout-minutes: 30 strategy: fail-fast: false matrix: os: [ubuntu-latest, macos-latest, windows-latest] node: ['20'] env: # Use the bundled Chromium and run headless on CI. # These settings are NOT recommended for real stealth usage — # see README.md "Stealth notes". They exist so smoke tests can run # in GitHub Actions runners without a display or a pre-installed Chrome. NATIVEWRIGHT_CHANNEL: chromium NATIVEWRIGHT_HEADLESS: '1' NATIVEWRIGHT_NO_EXEC_PATH: '1' # On GitHub Actions Ubuntu runners, containerized/restricted chromium # launches sometimes need --no-sandbox. Runners are non-root but the # kernel SUID sandbox is not always available. Keeping this on for CI # avoids "No usable sandbox!" crashes without affecting real users. NATIVEWRIGHT_ALLOW_NO_SANDBOX: '1' steps: - name: Checkout uses: actions/checkout@v4 - name: Setup Node.js ${{ matrix.node }} uses: actions/setup-node@v4 with: node-version: ${{ matrix.node }} cache: npm - name: Install dependencies run: npm ci - name: Install Chromium (Patchright-managed) run: npx patchright install chromium --with-deps - name: Run tests (smoke + input layer) run: npm test - name: Run browser-less sanity checks run: npm run test:sanity - name: Upload artifacts on failure if: failure() uses: actions/upload-artifact@v4 with: name: nativewright-logs-${{ matrix.os }}-${{ matrix.node }} path: | test/artifacts/ ~/.local/share/nativewright/logs/ ~/Library/Application Support/NativeWright/logs/ ${{ env.LOCALAPPDATA }}\NativeWright\logs\ if-no-files-found: ignore retention-days: 7