Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Add Codecov for test coverage reporting #401

Merged
merged 2 commits into from
Sep 30, 2024
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
7 changes: 6 additions & 1 deletion .github/workflows/build-and-test.yml
Original file line number Diff line number Diff line change
Expand Up @@ -45,6 +45,12 @@ 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@v3
with:
verbose: true
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 +102,3 @@ jobs:
run: |
cd OpenSearch-Dashboards/plugins/dashboards-flow-framework
yarn run test:jest --coverage

10 changes: 4 additions & 6 deletions codecov.yml
Original file line number Diff line number Diff line change
@@ -1,17 +1,15 @@
# 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
threshold: 5%
patch: no
changes: no
patch: yes
changes: yes

# disable comments in PRs
comment: no
comment: yes
Loading