Skip to content

Commit 5c5b43b

Browse files
committedSep 27, 2024
Add Codecov for test coverage reporting
Signed-off-by: saimedhi <saimedhi@amazon.com>
1 parent dd20c6f commit 5c5b43b

File tree

2 files changed

+10
-4
lines changed

2 files changed

+10
-4
lines changed
 

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

+8
Original file line numberDiff line numberDiff line change
@@ -45,6 +45,10 @@ 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@v2
50+
env:
51+
CODECOV_TOKEN: ${{ secrets.CODECOV_TOKEN }}
4852

4953
# TODO: once github actions supports windows and macos docker containers, we can
5054
# merge these in to the above step's matrix, including adding windows support
@@ -96,4 +100,8 @@ jobs:
96100
run: |
97101
cd OpenSearch-Dashboards/plugins/dashboards-flow-framework
98102
yarn run test:jest --coverage
103+
- name: Uploads coverage
104+
uses: codecov/codecov-action@v2
105+
env:
106+
CODECOV_TOKEN: ${{ secrets.CODECOV_TOKEN }}
99107

‎codecov.yml

+2-4
Original file line numberDiff line numberDiff line change
@@ -1,11 +1,9 @@
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
@@ -14,4 +12,4 @@ coverage:
1412
changes: no
1513

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

0 commit comments

Comments
 (0)