-
Notifications
You must be signed in to change notification settings - Fork 5
52 lines (41 loc) · 1.43 KB
/
Copy pathcodecov.yml
File metadata and controls
52 lines (41 loc) · 1.43 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
40
41
42
43
44
45
46
47
48
49
50
51
52
name: codecov
on:
push:
branches:
- main
jobs:
run:
runs-on: ubuntu-18.04 # IMPORTANT!!! this LINUX os should be the same as in build-and-test and release workflows! this is for making sure caches are used in most efficient way
steps:
- name: Check out Git repository
uses: actions/checkout@v2.3.4
- name: Setup Node.js environment
uses: actions/setup-node@v2.1.4
with:
node-version: '12'
- name: Get yarn cache directory path
id: yarn-cache-dir-path
run: echo "::set-output name=dir::$(yarn cache dir)"
- uses: actions/cache@v2.1.3
id: yarn-cache # use this to check for `cache-hit` (`steps.yarn-cache.outputs.cache-hit != 'true'`)
with:
path: ${{ steps.yarn-cache-dir-path.outputs.dir }}
key: ubuntu-18.04-yarn-${{ hashFiles('**/yarn.lock') }}
restore-keys: |
ubuntu-18.04-yarn-
- name: Install
run: yarn
- name: npm install -g codecov
run: npm install -g codecov
- name: npm run test
run: npm run test
- name: npm run coverage
run: npm run coverage
#- name: Upload app coverage to Codecov
# uses: codecov/codecov-action@v1.0.12
# with:
# token: ${{ secrets.CODECOV_TOKEN }}
# file: ./coverage/clover.xml
# flags: unittests
# name: codecov-umbrella
# fail_ci_if_error: true