Combine coverage across all builds #621
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
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: List what we have | |
run: find . |