Skip to content

Commit e78979c

Browse files
committedSep 27, 2024
Add Codecov for test coverage reporting - v4.5.0 uploader
Signed-off-by: saimedhi <saimedhi@amazon.com>
1 parent 717f82d commit e78979c

File tree

1 file changed

+11
-4
lines changed

1 file changed

+11
-4
lines changed
 

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

+11-4
Original file line numberDiff line numberDiff line change
@@ -26,6 +26,8 @@ jobs:
2626
container:
2727
image: ${{ needs.Get-CI-Image-Tag.outputs.ci-image-version-linux }}
2828
options: --user root
29+
env:
30+
PYTHON: '3.10'
2931

3032
steps:
3133
- name: Checkout OpenSearch Dashboards
@@ -34,6 +36,10 @@ jobs:
3436
repository: opensearch-project/OpenSearch-Dashboards
3537
ref: ${{ env.OPENSEARCH_DASHBOARDS_VERSION }}
3638
path: OpenSearch-Dashboards
39+
- name: Setup Python
40+
uses: actions/setup-python@main
41+
with:
42+
python-version: 3.10
3743
- name: Checkout plugin
3844
uses: actions/checkout@v2
3945
with:
@@ -46,9 +52,10 @@ jobs:
4652
cd ./plugins/dashboards-flow-framework &&
4753
whoami && yarn osd bootstrap && yarn build && yarn run test:jest --coverage"
4854
- name: Uploads coverage
49-
uses: codecov/codecov-action@v4.5.0
50-
env:
51-
CODECOV_TOKEN: ${{ secrets.CODECOV_TOKEN }}
55+
uses: codecov/codecov-action@v4
56+
with:
57+
env_vars: PYTHON
58+
token: ${{ secrets.CODECOV_TOKEN }}
5259

5360
# TODO: once github actions supports windows and macos docker containers, we can
5461
# merge these in to the above step's matrix, including adding windows support
@@ -101,7 +108,7 @@ jobs:
101108
cd OpenSearch-Dashboards/plugins/dashboards-flow-framework
102109
yarn run test:jest --coverage
103110
- name: Uploads coverage
104-
uses: codecov/codecov-action@v4.5.0
111+
uses: codecov/codecov-action@v4
105112
env:
106113
CODECOV_TOKEN: ${{ secrets.CODECOV_TOKEN }}
107114

0 commit comments

Comments
 (0)