diff --git a/.github/workflows/maven.yml b/.github/workflows/maven.yml index 3d52846c2..348d30afd 100644 --- a/.github/workflows/maven.yml +++ b/.github/workflows/maven.yml @@ -35,4 +35,11 @@ jobs: - name: Update submodule run: git submodule update --init - name: Build with Maven - run: mvn --batch-mode --update-snapshots verify \ No newline at end of file + run: mvn -Pcoverage --batch-mode --update-snapshots verify + - name: Upload coverage + uses: codecov/codecov-action@v5 + with: + files: ./sdk-core/target/site/jacoco/jacoco.xml,./sdk-bulkwriter/target/site/jacoco/jacoco.xml + name: ubuntu-jacoco-coverage + disable_safe_directory: true + verbose: true diff --git a/codecov.yml b/codecov.yml new file mode 100644 index 000000000..fd8a539b2 --- /dev/null +++ b/codecov.yml @@ -0,0 +1,39 @@ +# Configuration for Codecov +codecov: + require_ci_to_pass: no + notify: + require_ci_to_pass: no + wait_for_ci: false + +coverage: + precision: 2 + round: down + range: "70...100" + + status: + project: + default: + target: 70% + threshold: 0% + patch: + default: + target: 80% + threshold: 0% + if_ci_failed: error + +comment: + layout: "reach, diff, flags, files" + behavior: default + require_changes: false + branches: + - master + +ignore: + - .github + - benchmark + - doc + - examples + - tests + - "**/*.md" + - "**/*.yml" + - "**/*.yaml" diff --git a/pom.xml b/pom.xml index d580dfe3e..d09f3974c 100644 --- a/pom.xml +++ b/pom.xml @@ -155,6 +155,7 @@ 2.19.1 1.6.0 3.1.3 + 0.8.12 1.1.0 5.10.1 2.13.1 @@ -226,6 +227,44 @@ + + coverage + + + + org.apache.maven.plugins + maven-surefire-plugin + ${maven.surefire.plugin.version} + + ${jacocoArgLine} + + + + org.jacoco + jacoco-maven-plugin + ${jacoco.maven.plugin.version} + + + jacoco-prepare-agent + + prepare-agent + + + jacocoArgLine + + + + jacoco-report + verify + + report + + + + + + +