fix: don't reply with an error if the child is not available anymore #164
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: Lint and Test | |
# Controls when the action will run. | |
on: | |
push: | |
branches: | |
- '**' | |
tags: | |
- 'v**' | |
pull_request: | |
# A workflow run is made up of one or more jobs that can run sequentially or in parallel | |
jobs: | |
lint: | |
name: Linting | |
runs-on: ubuntu-latest | |
timeout-minutes: 10 | |
steps: | |
# Checks-out your repository under $GITHUB_WORKSPACE, so your job can access it | |
- uses: actions/checkout@v3 | |
- name: Use Node.js 14.x | |
uses: actions/setup-node@v3 | |
with: | |
node-version: 14.x | |
- name: Cache node_modules | |
uses: actions/cache@v3 | |
with: | |
path: '**/node_modules' | |
key: ${{ runner.os }}-modules-${{ hashFiles('**/yarn.lock') }} | |
- name: Prepare Environment | |
run: | | |
yarn | |
yarn build | |
env: | |
CI: true | |
- name: Run Linting | |
run: | | |
yarn lint | |
env: | |
CI: true | |
test: | |
name: Test on node ${{ matrix.node_version }} and ${{ matrix.os }} | |
runs-on: ${{ matrix.os }} | |
strategy: | |
matrix: | |
node_version: ['10', '12', '14', '16', '18'] | |
os: [ubuntu-latest] # [windows-latest, macOS-latest] | |
timeout-minutes: 10 | |
steps: | |
# Checks-out your repository under $GITHUB_WORKSPACE, so your job can access it | |
- uses: actions/checkout@v3 | |
- name: Use Node.js ${{ matrix.node_version }} | |
uses: actions/setup-node@v3 | |
with: | |
node-version: ${{ matrix.node_version }} | |
- name: Cache node_modules | |
uses: actions/cache@v3 | |
with: | |
path: '**/node_modules' | |
key: ${{ runner.os }}-modules-${{ hashFiles('**/yarn.lock') }} | |
- name: Prepare Environment | |
run: | | |
yarn install --ignore-engines | |
yarn build | |
env: | |
CI: true | |
- name: Run unit tests and collect coverage | |
run: | | |
yarn unit --coverage=true | |
env: | |
CI: true | |
- name: Send test coverage # Note: codecov will merge the coverage reports automatically. This is good, since different node-versions utilize different code paths. | |
run: | | |
yarn send-coverage | |
env: | |
CI: true |