Skip to content

Commit

Permalink
Add Codecov for test coverage reporting
Browse files Browse the repository at this point in the history
Signed-off-by: saimedhi <[email protected]>
  • Loading branch information
saimedhi committed Sep 27, 2024
1 parent dd20c6f commit 5c5b43b
Show file tree
Hide file tree
Showing 2 changed files with 10 additions and 4 deletions.
8 changes: 8 additions & 0 deletions .github/workflows/build-and-test.yml
Original file line number Diff line number Diff line change
Expand Up @@ -45,6 +45,10 @@ jobs:
su `id -un 1000` -c "source $NVM_DIR/nvm.sh && nvm use && node -v && yarn -v &&
cd ./plugins/dashboards-flow-framework &&
whoami && yarn osd bootstrap && yarn build && yarn run test:jest --coverage"
- name: Uploads coverage
uses: codecov/codecov-action@v2
env:
CODECOV_TOKEN: ${{ secrets.CODECOV_TOKEN }}

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

6 changes: 2 additions & 4 deletions codecov.yml
Original file line number Diff line number Diff line change
@@ -1,11 +1,9 @@
# disable tracking status entirely until UT is added.
# tracking issue: https://github.com/opensearch-project/dashboards-flow-framework/issues/95
coverage:
# displays different colors depending on below, between, or above the range
range: 50..90
status:
project:
enabled: no
enabled: yes
default:
target: auto
# allows 5% coverage reduction without failing
Expand All @@ -14,4 +12,4 @@ coverage:
changes: no

# disable comments in PRs
comment: no
comment: yes

0 comments on commit 5c5b43b

Please sign in to comment.