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

Move codecov upload to its own GHA job #52

Closed
wants to merge 1 commit into from
Closed
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
26 changes: 17 additions & 9 deletions .github/workflows/CI.yml
Original file line number Diff line number Diff line change
Expand Up @@ -39,7 +39,23 @@ jobs:
run: ./gradlew checkstyleMain
- name: Javadoc Check
run: ./gradlew javadoc

codecov:
if: github.repository == 'opensearch-project/opensearch-remote-metadata-sdk'
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v4
- uses: actions/setup-java@v4
with:
java-version: 21
distribution: temurin
- name: Run Tests
run: ./gradlew test
- name: Upload Coverage Report
uses: codecov/codecov-action@v5
env:
CODECOV_TOKEN: ${{ secrets.CODECOV_TOKEN }}
with:
files: ./build/reports/jacoco/test/jacocoTestReport.xml
build-linux:
needs: [Get-CI-Image-Tag, spotless, javadoc]
strategy:
Expand Down Expand Up @@ -71,14 +87,6 @@ jobs:
su `id -un 1000` -c 'whoami && java -version &&
echo "build and run tests" && ./gradlew build &&
echo "Publish to Maven Local" && ./gradlew publishToMavenLocal'
- name: Upload Coverage Report
if: contains(matrix.java, '21')
uses: codecov/codecov-action@v5
env:
CODECOV_TOKEN: ${{ secrets.CODECOV_TOKEN }}
with:
file: ./build/reports/jacoco/test/jacocoTestReport.xml

build-windows:
needs: [spotless, javadoc]
strategy:
Expand Down