Skip to content
This repository has been archived by the owner on Sep 16, 2024. It is now read-only.

Feat(browser-emulator): Migrating away from proxies, lots of extra improvements and enabling TS strict mode #793

Feat(browser-emulator): Migrating away from proxies, lots of extra improvements and enabling TS strict mode

Feat(browser-emulator): Migrating away from proxies, lots of extra improvements and enabling TS strict mode #793

Workflow file for this run

name: Test Matrix
on:
push:
branches:
- '*'
- '!gh-pages'
pull_request:
workflow_dispatch:
concurrency:
group: ${{ github.workflow }}-${{ github.ref }}
cancel-in-progress: "${{ github.event_name == 'pull_request' }}"
jobs:
lint-and-test:
name: Test node-${{ matrix.node-version }}, ${{ matrix.os }}, ${{matrix.browser || 'latest'}}
timeout-minutes: 30
strategy:
fail-fast: false
matrix:
os: [macos-13, windows-latest, ubuntu-latest]
node-version: [18, 20]
include:
- node-version: 20.x
os: ubuntu-latest
browser: chrome-120-0
- node-version: 20.x
os: ubuntu-latest
browser: chrome-115-0
- node-version: 20.x
os: ubuntu-latest
browser: chrome-114-0
runs-on: ${{ matrix.os }}
steps:
- uses: actions/checkout@v4
with:
submodules: 'recursive'
- uses: actions/setup-node@v4
with:
node-version: ${{ matrix.node-version }}
cache: 'yarn'
- name: Install pcap
if: ${{ matrix.os == 'ubuntu-latest' }}
run: sudo apt-get install -y libpcap-dev
- name: Chocolatey Install Action
if: ${{ matrix.os == 'windows-latest' }}
uses: crazy-max/ghaction-chocolatey@v3
with:
args: install python2 visualcpp-build-tools -y
- uses: actions/setup-go@v5
with:
go-version: '1.20'
- name: Add msbuild to PATH
uses: microsoft/setup-msbuild@v2
if: ${{ matrix.os == 'windows-latest' }}
- name: Clone ulixee/shared
run: git clone https://github.com/ulixee/shared.git
working-directory: ..
- name: Install ulixee/shared
run: yarn build
working-directory: ../shared
- name: Yarn build
run: yarn build
env:
ULX_MITM_REBUILD_SOCKET: 1
- name: Linux - Add Chrome Env
if: ${{ matrix.browser }}
working-directory: ./build
run: yarn add -W @ulixee/${{ matrix.browser }}
- name: Linux - Apt Install Chrome(s)
if: ${{ matrix.os == 'ubuntu-latest' }}
working-directory: ./build
run: sudo $(npx install-browser-deps)
- name: Run Lint
if: ${{ matrix.os == 'ubuntu-latest' && matrix.node-version == 18 }}
run: NODE_OPTIONS=--max-old-space-size=4096 yarn lint
- name: Run tests
run: yarn jest --testTimeout=60000 --maxWorkers=1
working-directory: ./build
env:
ULX_DATA_DIR: .data-test
NODE_ENV: test
ULX_DEFAULT_BROWSER_ID: ${{ matrix.browser }}
NODE_OPTIONS: --max-old-space-size=4096
- name: 'Tar files'
if: ${{ failure() }}
working-directory: ./build
run: tar -cvf test-logs.tar .data-test
- name: Upload Databases
if: ${{ failure() }}
uses: actions/upload-artifact@v4
with:
name: test-logs-${{matrix.os}}-${{ matrix.node-version }}-${{matrix.browser || 'main'}}
path: build/test-logs.tar
retention-days: 1