-
Notifications
You must be signed in to change notification settings - Fork 6
38 lines (31 loc) · 970 Bytes
/
coverage.yml
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
name: Publish Coverage
# Run this action at every commit on every branch
on: [push]
jobs:
run:
runs-on: ubuntu-latest
steps:
- name: Check out repository code
uses: actions/checkout@v3
- name: Prepare NodeJS environment
uses: actions/setup-node@v3
with:
node-version: 14.x
- name: Cache npm dependencies
uses: actions/cache@v3.3.3
with:
path: '~/.npm'
key: ${{ runner.os }}-node-${{ hashFiles('**/package-lock.json') }}
restore-keys: |
${{ runner.os }}-node-
# Install dependencies, than run tests and create coverage report
- name: Generate coverage report
run: |
npm install
npm run coverage
- name: Upload coverage to Codecov
uses: codecov/codecov-action@v3.1.6
with:
token: ${{ secrets.CODECOV_TOKEN }}
directory: ./coverage
name: codecov-umbrella