-
Notifications
You must be signed in to change notification settings - Fork 1
44 lines (42 loc) · 1.15 KB
/
codecov.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
39
40
41
42
43
44
name: Codecov Report Upload
on:
push:
branches:
- master
pull_request:
types: [labeled]
jobs:
unit-test:
permissions: write-all
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v1
- name: Setup GitHub Action
uses: actions/setup-node@v1
with:
node-version: 14
- name: Cache Dependencies
uses: actions/cache@v3
id: cache
with:
path: |
node_modules
key: unit-test-cache-${{ runner.os }}-${{ hashFiles('package-lock.json') }}
- name: Install dependencies
if: steps.cache.outputs.cache-hit != 'true'
run: npm install
- name: Test
run: npm run unit_test:ci
env:
FYLE_CLIENT_ID: ${{secrets.FYLE_CLIENT_ID}}
CALLBACK_URI: ${{secrets.CALLBACK_URI}}
API_URL: ${{secrets.API_URL}}
FYLE_APP_URL: ${{secrets.FYLE_APP_URL}}
- name: Unit Test Coverage
uses: fylein/comment-test-coverage@master
with:
token: ${{ secrets.GITHUB_TOKEN }}
path: coverage/coverage-summary.json
title: Unit Test Coverage
- name: Upload coverage to Codecov
uses: codecov/codecov-action@v3