Skip to content

add a few more tests #700

add a few more tests

add a few more tests #700

Workflow file for this run

on:
push:
pull_request:
schedule:
- cron: '0 4 * * *'
jobs:
build:
runs-on: ubuntu-latest
strategy:
matrix:
node-version:
- 12.x
- 14.x
- 16.10.0
- 16.16.0
- 16.17.0
- 16.x
- 17.x
- 18.5.0
- 18.18.0
- 18.19.0
- 18.x
- 20.9.0
- 20.x
- 21.x
os:
- ubuntu-latest
- macos-latest
- windows-latest
steps:
- uses: actions/checkout@v2
- name: Use Node.js ${{ matrix.node-version }}
uses: actions/setup-node@v2
with:
node-version: ${{ matrix.node-version }}
- run: npm install
- run: npm test
- run: npm run test:ts
if: (matrix.node-version != '12.x' && matrix.node-version != '14.x' && matrix.node-version != '16.10.0')
- name: Archive code coverage results
if: success()
uses: actions/upload-artifact@v3
with:
name: coverage_${{ matrix.os }}_${{ matrix.node-version}}
if-no-files-found: ignore
path: coverage/lcov.info
coverage:
runs-on: ubuntu-latest
needs: build
steps:
- name: Download reports' artifacts
uses: actions/download-artifact@v3
with:
path: downloaded_artifacts
- name: Install lcov
run: |
sudo apt update
sudo apt install -y lcov
- name: Combine all coverage data
run: |
find . -type f -name '*.info' -exec echo -a {} \; | xargs --verbose lcov -o all_lcov.info
- name: Report
run: >
lcov --summary all_lcov.info
lcov --summary all_lcov.info | grep lines | cut -d' ' -f 4 | cut -d% -f 1 | xargs node -e "x=process.argv[1];console.log(x);assert(+x >= 90)"