Skip to content

Commit

Permalink
github-actions: add coverage script (#313)
Browse files Browse the repository at this point in the history
* github-actions: add coverage script

* github-actions: add coverage script

* Update coverage.yml

- Change to only on push. Running coverage on PR is very heavy.
 
- Uploads the report to CodeCov via the shell script for the badge.

Co-authored-by: Vectorized <webby1111@hotmail.com>
  • Loading branch information
caffeinum and Vectorized authored Jun 6, 2022
1 parent e96b690 commit 67ae09f
Showing 1 changed file with 32 additions and 0 deletions.
32 changes: 32 additions & 0 deletions .github/workflows/coverage.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,32 @@
name: Code Coverage

on:
push:
branches:
- main
paths-ignore:
- 'docs/**'
- '**.md'

jobs:
run-tests:
runs-on: ubuntu-latest

strategy:
matrix:
node-version: [16.x]

steps:
- uses: actions/checkout@v2
- name: Use Node.js ${{ matrix.node-version }}
uses: actions/setup-node@v2
with:
node-version: ${{ matrix.node-version }}
- name: Install dependencies
run: npm ci
- name: Run Coverage and Upload to CodeCov
run: |
npm run coverage; \
curl -Os https://uploader.codecov.io/latest/linux/codecov; \
chmod +x codecov; \
./codecov;

0 comments on commit 67ae09f

Please sign in to comment.