diff --git a/.github/workflows/CI.yml b/.github/workflows/CI.yml index 30d8d47..578a265 100644 --- a/.github/workflows/CI.yml +++ b/.github/workflows/CI.yml @@ -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: + file: ./build/reports/jacoco/test/jacocoTestReport.xml build-linux: needs: [Get-CI-Image-Tag, spotless, javadoc] strategy: @@ -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: