Skip to content

Commit 3e24e5a

Browse files
Enable code coverage reporting (#70)
* Upload coverage reports to Codecov using GitHub Actions * Add Codecov badge in the readme * Use Codecov upload token secret
1 parent 1962442 commit 3e24e5a

File tree

2 files changed

+18
-13
lines changed

2 files changed

+18
-13
lines changed

.github/workflows/nodejs.yml

Lines changed: 17 additions & 13 deletions
Original file line numberDiff line numberDiff line change
@@ -4,23 +4,27 @@ on: [push]
44

55
jobs:
66
build:
7-
87
runs-on: ubuntu-latest
98

109
strategy:
1110
matrix:
1211
node-version: [12.x]
1312

1413
steps:
15-
- uses: actions/checkout@v1
16-
- name: Use Node.js ${{ matrix.node-version }}
17-
uses: actions/setup-node@v1
18-
with:
19-
node-version: ${{ matrix.node-version }}
20-
- name: npm ci, build, and test
21-
run: |
22-
npm ci
23-
npm run build --if-present
24-
npm test
25-
env:
26-
CI: true
14+
- uses: actions/checkout@v1
15+
- name: Use Node.js ${{ matrix.node-version }}
16+
uses: actions/setup-node@v1
17+
with:
18+
node-version: ${{ matrix.node-version }}
19+
- name: npm ci, build, and test
20+
run: |
21+
npm ci
22+
npm run build --if-present
23+
npm test
24+
env:
25+
CI: true
26+
- name: Upload coverage to Codecov
27+
uses: codecov/codecov-action@v1.0.6
28+
with:
29+
token: ${{secrets.CODECOV_TOKEN}}
30+
file: ./coverage/clover.xml

README.md

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,7 @@
11
# std
22

33
[![Greenkeeper badge](https://badges.greenkeeper.io/sandstreamdev/std.svg)](https://greenkeeper.io/)
4+
[![Codecov](https://codecov.io/gh/sandstreamdev/std/branch/master/graph/badge.svg)](https://codecov.io/gh/sandstreamdev/std)
45
[![All Contributors](https://img.shields.io/badge/all_contributors-4-orange.svg?style=flat-square)](#contributors)
56

67
## Installation

0 commit comments

Comments
 (0)