Skip to content

v2.0.0-alpha.24

v2.0.0-alpha.24 #874

Workflow file for this run

name: Test Matrix
on:
push:
branches:
- '*'
- '!gh-pages'
pull_request:
workflow_dispatch:
jobs:
lint-and-test:
name: Test Node.js ${{ matrix.node-version }} on ${{ matrix.os }}
timeout-minutes: 30
strategy:
fail-fast: false
matrix:
os: [ macos-latest, windows-latest, ubuntu-latest ]
node-version: [16, 18, 20]
runs-on: ${{ matrix.os }}
steps:
- name: /etc/hosts
if: ${{ matrix.os == 'ubuntu-latest' || matrix.os == 'macos-latest' }}
run: |
sudo echo "127.0.0.1 docs.datastoresrus.com" | sudo tee -a /etc/hosts
sudo echo "127.0.0.1 bootup-datastore.com" | sudo tee -a /etc/hosts
shell: bash
- name: C:/Windows/System32/drivers/etc/hosts
if: ${{ matrix.os == 'windows-latest' }}
run: |
echo "127.0.0.1 docs.datastoresrus.com" | tee -a C:/Windows/System32/drivers/etc/hosts
echo "127.0.0.1 bootup-datastore.com" | tee -a C:/Windows/System32/drivers/etc/hosts
shell: bash
- uses: actions/checkout@v3
with:
submodules: 'true'
- uses: actions/setup-node@v3
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@v2
with:
args: install python2 visualcpp-build-tools -y
- name: Add msbuild to PATH
uses: microsoft/[email protected]
if: ${{ matrix.os == 'windows-latest' }}
- name: Clone ulixee/shared
run: git clone --recurse-submodules -j8 https://github.com/ulixee/shared.git
working-directory: ..
- name: Install ulixee/shared
run: yarn && yarn build
working-directory: ../shared
- name: Clone ulixee/payments
run: git clone --recurse-submodules -j8 https://github.com/ulixee/payments.git
working-directory: ..
- name: Install ulixee/payments
run: yarn && yarn build
working-directory: ../payments
- name: Clone unblocked
run: git clone --recurse-submodules -j8 https://github.com/ulixee/unblocked.git
working-directory: ..
- name: Install unblocked
run: yarn build
working-directory: ../unblocked
- name: Install Hero
run: yarn build
working-directory: ./hero
- name: Relink Shared
run: yarn build
working-directory: ../shared
- name: Yarn build
run: yarn --ignore-engines && yarn build --ignore-engines
env:
ELECTRON_SKIP_BINARY_DOWNLOAD: 1
- 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 test --testTimeout=60000 --maxWorkers=2
env:
CI: true
- name: 'Tar files'
if: ${{ failure() }}
run: tar -cvf test-dbs.tar build/.data-test
- name: Upload Databases
if: ${{ failure() }}
uses: actions/upload-artifact@v3
with:
name: test-dbs-${{matrix.os}}-${{ matrix.node-version }}
path: test-dbs.tar
retention-days: 1