-
Notifications
You must be signed in to change notification settings - Fork 0
39 lines (34 loc) · 1.08 KB
/
codecov.yml
File metadata and controls
39 lines (34 loc) · 1.08 KB
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
39
name: "Upload codecov report"
on:
workflow_call:
secrets:
CODE_COV_CI_TOKEN:
required: true
jobs:
release:
runs-on: ubuntu-latest
steps:
# ① checkout to branch
- name: Checkout
uses: actions/checkout@v6
with:
fetch-depth: 0
# ② set up node.js lts version
- name: Setup Node.js
uses: actions/setup-node@v2
with:
node-version: 'lts/*'
# ③ install npm dependencies package
- name: Install dependencies
run: npm i && npm i -g codecov @vodyani/coverage-report
# ④ run jest and build coverage report
- name: Run unit test
run: JEST_REPORT_JSON=${REPORT_JSON} npm run test:coverage --i --testResultsProcessor="${RESULT_PROCESSOR}"
env:
REPORT_JSON: "./coverage/report.json"
RESULT_PROCESSOR: "@vodyani/coverage-report"
# ⑤ upload report
- name: upload report
run: cd coverage && codecov --disable=gcov --token=$CODE_COV_CI_TOKEN
env:
CODE_COV_CI_TOKEN: ${{ secrets.CODE_COV_CI_TOKEN }}