Skip to content

revert: not necessary to mock ens #739

revert: not necessary to mock ens

revert: not necessary to mock ens #739

Workflow file for this run

# CI for src folder
name: CI
on:
pull_request:
branches:
- '**'
paths:
- 'test/**'
- 'src/**'
- 'config/**'
# - '.github/**'
- 'package.json'
- 'yarn.lock'
push:
branches:
- '**'
paths:
- 'test/**'
- 'src/**'
- 'config/**'
- '.github/**'
- 'package.json'
- 'yarn.lock'
jobs:
test:
runs-on: ${{ matrix.os }}
timeout-minutes: 30
strategy:
matrix:
os:
- ubuntu-22.04
steps:
- run: sudo apt install -y xvfb
- uses: actions/checkout@v3
- uses: actions/setup-node@v3
with:
node-version: 22
- run: yarn install --frozen-lockfile
- name: Run unit tests
id: run_unit_tests
run: yarn test --pool=forks # --pool=forks fixes "Segmentation fault" error in CI
- name: Print failed unit tests
if: ${{ failure() && steps.run_unit_tests.outcome == 'failure' }}
run: node .github/workflows/print-vitest-failures.cjs
- run: yarn build
# disable hosts we shouldn't use
- run: sudo echo "255.255.255.255 cloudflare-ipfs.com" | sudo tee -a /etc/hosts
- run: sudo echo "255.255.255.255 pubsubprovider.xyz" | sudo tee -a /etc/hosts
# installing the browsers shouldn't be needed, but doesn't work without it for some reason
- run: yarn playwright install
- run: yarn test:server & yarn test:server:wait-on
- name: Run e2e mock tests
id: run_e2e_mock
run: CHROME_BIN=$(which chromium-browser) yarn test:e2e:mock
- name: Print failed e2e mock tests
if: ${{ failure() && steps.run_e2e_mock.outcome == 'failure' }}
run: node .github/workflows/print-vitest-failures.cjs
- name: Run e2e chrome tests
id: run_e2e_chrome
run: DEBUG="plebbit-js:*,plebbit-react-hooks:*" CHROME_BIN=$(which chromium-browser) yarn test:e2e:chrome
- name: Print failed e2e chrome tests
if: ${{ failure() && steps.run_e2e_chrome.outcome == 'failure' }}
run: node .github/workflows/print-vitest-failures.cjs
- name: Run e2e firefox tests
id: run_e2e_firefox
run: DEBUG="plebbit-js:*,plebbit-react-hooks:*" FIREFOX_BIN=$(which firefox) yarn test:e2e:firefox
- name: Print failed e2e firefox tests
if: ${{ failure() && steps.run_e2e_firefox.outcome == 'failure' }}
run: node .github/workflows/print-vitest-failures.cjs
- name: Run e2e mock-content tests
id: run_e2e_mock_content
run: CHROME_BIN=$(which chromium-browser) yarn test:e2e:mock-content
- name: Print failed e2e mock-content tests
if: ${{ failure() && steps.run_e2e_mock_content.outcome == 'failure' }}
run: node .github/workflows/print-vitest-failures.cjs