Skip to content
Open
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
21 changes: 19 additions & 2 deletions .github/workflows/gradle-check.yml
Original file line number Diff line number Diff line change
Expand Up @@ -40,6 +40,10 @@ jobs:
issues: write # To create an issue if check fails on push.
runs-on: ubuntu-latest
timeout-minutes: 130
strategy:
fail-fast: false
matrix:
module_name: [ server, non-server ]
steps:
- name: Checkout OpenSearch repo
uses: actions/checkout@v5
Expand All @@ -59,6 +63,7 @@ jobs:
echo "pr_owner=$(jq --raw-output .pull_request.user.login $GITHUB_EVENT_PATH)" >> $GITHUB_ENV
echo "pr_or_commit_description=$(jq --ascii-output .pull_request.body $GITHUB_EVENT_PATH)" >> $GITHUB_ENV
echo "post_merge_action=false" >> $GITHUB_ENV
echo "module_name=${{ matrix.module_name }}" >> $GITHUB_ENV

# to get the PR data that can be used for post merge actions
- uses: actions/github-script@v7
Expand Down Expand Up @@ -91,6 +96,7 @@ jobs:
echo 'pr_number=${{ fromJson(steps.get_pr_data.outputs.result).number }}' >> $GITHUB_ENV
echo "pr_or_commit_description=$(jq --ascii-output .head_commit.message $GITHUB_EVENT_PATH)" >> $GITHUB_ENV
echo "post_merge_action=true" >> $GITHUB_ENV
echo "module_name=${{ matrix.module_name }}" >> $GITHUB_ENV

- name: Checkout opensearch-build repo
uses: actions/checkout@v5
Expand All @@ -113,12 +119,23 @@ jobs:
echo "workflow_url=$WORKFLOW_URL" >> $GITHUB_ENV
echo "result=$RESULT" >> $GITHUB_ENV

- name: Upload Coverage Report
- name: Upload Coverage Report for Unit Tests
if: success()
uses: codecov/codecov-action@v5
with:
token: ${{ secrets.CODECOV_TOKEN }}
files: ./codeCoverage.xml
files: codeCoverage/testCodeCoverageReport.xml
flags: unit
name: unit-tests

- name: Upload Coverage Report for Integration Tests
if: success()
uses: codecov/codecov-action@v5
with:
token: ${{ secrets.CODECOV_TOKEN }}
files: codeCoverage/*Test.xml
flags: integration
name: integration-tests

- name: Create Comment Success
if: ${{ github.event_name == 'pull_request_target' && success() && env.result == 'SUCCESS' }}
Expand Down
10 changes: 10 additions & 0 deletions codecov.yml
Original file line number Diff line number Diff line change
Expand Up @@ -15,3 +15,13 @@ coverage:
default:
target: 70% # the required coverage value
threshold: 1% # the leniency in hitting the target
unit-tests:
target: 60%
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

curious how did we come up with these nums? What are we at today with this broken out?

threshold: 1%
flags:
- unit
integration-tests:
target: 50%
threshold: 1%
flags:
- integration
Loading