Skip to content

Commit 09897ad

Browse files
authored
Add Codecov for test coverage reporting (#401)
* Added Codecov for unit test coverage reporting Signed-off-by: saimedhi <saimedhi@amazon.com> * Added Codecov for unit test coverage reporting Signed-off-by: saimedhi <saimedhi@amazon.com> --------- Signed-off-by: saimedhi <saimedhi@amazon.com>
1 parent dd20c6f commit 09897ad

File tree

2 files changed

+10
-7
lines changed

2 files changed

+10
-7
lines changed

.github/workflows/build-and-test.yml

+6-1
Original file line numberDiff line numberDiff line change
@@ -45,6 +45,12 @@ jobs:
4545
su `id -un 1000` -c "source $NVM_DIR/nvm.sh && nvm use && node -v && yarn -v &&
4646
cd ./plugins/dashboards-flow-framework &&
4747
whoami && yarn osd bootstrap && yarn build && yarn run test:jest --coverage"
48+
- name: Uploads coverage
49+
uses: codecov/codecov-action@v3
50+
with:
51+
verbose: true
52+
env:
53+
CODECOV_TOKEN: ${{ secrets.CODECOV_TOKEN }}
4854

4955
# TODO: once github actions supports windows and macos docker containers, we can
5056
# merge these in to the above step's matrix, including adding windows support
@@ -96,4 +102,3 @@ jobs:
96102
run: |
97103
cd OpenSearch-Dashboards/plugins/dashboards-flow-framework
98104
yarn run test:jest --coverage
99-

codecov.yml

+4-6
Original file line numberDiff line numberDiff line change
@@ -1,17 +1,15 @@
1-
# disable tracking status entirely until UT is added.
2-
# tracking issue: https://github.com/opensearch-project/dashboards-flow-framework/issues/95
31
coverage:
42
# displays different colors depending on below, between, or above the range
53
range: 50..90
64
status:
75
project:
8-
enabled: no
6+
enabled: yes
97
default:
108
target: auto
119
# allows 5% coverage reduction without failing
1210
threshold: 5%
13-
patch: no
14-
changes: no
11+
patch: yes
12+
changes: yes
1513

1614
# disable comments in PRs
17-
comment: no
15+
comment: yes

0 commit comments

Comments
 (0)