Skip to content

Commit 1b283ca

Browse files
authored
Creating coverage.yml
1 parent b5cec60 commit 1b283ca

File tree

1 file changed

+34
-0
lines changed

1 file changed

+34
-0
lines changed

.github/workflows/coverage.yml

+34
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,34 @@
1+
name: Running Code Coverage
2+
3+
on: [push, pull_request]
4+
5+
jobs:
6+
build:
7+
8+
runs-on: ubuntu-latest
9+
10+
strategy:
11+
matrix:
12+
node-version: [12.x, 14.x]
13+
14+
steps:
15+
- name: Checkout repository
16+
uses: actions/checkout@v2
17+
with:
18+
fetch-depth: 2
19+
20+
- name: Set up Node.js ${{ matrix.node-version }}
21+
uses: actions/setup-node@v1
22+
with:
23+
node-version: ${{ matrix.node-version }}
24+
25+
- name: Install dependencies
26+
run: npm install --legacy-peer-deps
27+
28+
- name: Run the tests
29+
run: npm test -- --coverage
30+
31+
- name: Upload coverage to Codecov
32+
uses: codecov/codecov-action@v1
33+
with:
34+
token: ${{ secrets.CODECOV_TOKEN }}

0 commit comments

Comments
 (0)