Skip to content

Commit

Permalink
Add Codecov for test coverage reporting - v4.5.0 uploader
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 717f82d commit e78979c
Showing 1 changed file with 11 additions and 4 deletions.
15 changes: 11 additions & 4 deletions .github/workflows/build-and-test.yml
Original file line number Diff line number Diff line change
Expand Up @@ -26,6 +26,8 @@ jobs:
container:
image: ${{ needs.Get-CI-Image-Tag.outputs.ci-image-version-linux }}
options: --user root
env:
PYTHON: '3.10'

steps:
- name: Checkout OpenSearch Dashboards
Expand All @@ -34,6 +36,10 @@ jobs:
repository: opensearch-project/OpenSearch-Dashboards
ref: ${{ env.OPENSEARCH_DASHBOARDS_VERSION }}
path: OpenSearch-Dashboards
- name: Setup Python
uses: actions/setup-python@main
with:
python-version: 3.10
- name: Checkout plugin
uses: actions/checkout@v2
with:
Expand All @@ -46,9 +52,10 @@ jobs:
cd ./plugins/dashboards-flow-framework &&
whoami && yarn osd bootstrap && yarn build && yarn run test:jest --coverage"
- name: Uploads coverage
uses: codecov/[email protected]
env:
CODECOV_TOKEN: ${{ secrets.CODECOV_TOKEN }}
uses: codecov/codecov-action@v4
with:
env_vars: PYTHON
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 @@ -101,7 +108,7 @@ jobs:
cd OpenSearch-Dashboards/plugins/dashboards-flow-framework
yarn run test:jest --coverage
- name: Uploads coverage
uses: codecov/codecov-action@v4.5.0
uses: codecov/codecov-action@v4
env:
CODECOV_TOKEN: ${{ secrets.CODECOV_TOKEN }}

0 comments on commit e78979c

Please sign in to comment.