Callbacks for NewDocumentScripts #1053
Workflow file for this run
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
name: Test Matrix | |
on: | |
push: | |
branches: | |
- '*' | |
- '!gh-pages' | |
pull_request: | |
concurrency: | |
group: ${{ github.workflow }}-${{ github.ref }} | |
cancel-in-progress: true | |
jobs: | |
test: | |
name: Test ${{matrix.browser || 'chrome-latest' }} (node ${{ matrix.node-version }}; ${{ matrix.os }}) | |
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-125-0 | |
- node-version: 20.x | |
os: ubuntu-latest | |
browser: chrome-120-0 | |
- node-version: 20.x | |
os: ubuntu-latest | |
browser: chrome-115-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.23' | |
- name: Add msbuild to PATH | |
uses: microsoft/setup-msbuild@v2 | |
if: ${{ matrix.os == 'windows-latest' }} | |
- name: Build modules | |
run: yarn build | |
- 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 --forceExit | |
working-directory: ./build | |
env: | |
NODE_ENV: test | |
ULX_DATA_DIR: .data | |
ULX_DEFAULT_BROWSER_ID: ${{ matrix.browser }} | |
NODE_OPTIONS: --max-old-space-size=4096 | |
- name: 'Tar files' | |
if: ${{ failure() }} | |
run: tar -cvf test-dbs.tar ./build/.data | |
- name: Upload Databases | |
if: ${{ failure() }} | |
uses: actions/upload-artifact@v4 | |
with: | |
name: test-dbs-${{matrix.os}}-${{ matrix.node-version }}-${{matrix.browser || 'main'}} | |
path: test-dbs.tar | |
retention-days: 1 |