From e43f7ac59e9ad67051b0df88d572f28299e01523 Mon Sep 17 00:00:00 2001 From: Piotr Bulawa Date: Mon, 21 Oct 2024 14:32:47 +0200 Subject: [PATCH] SNOW-1735927: Add code coverage (#12) --- .github/workflows/build-test.yml | 12 ++++++++++++ README.md | 2 ++ pom.xml | 32 ++++++++++++++++++++++++++++++-- 3 files changed, 44 insertions(+), 2 deletions(-) diff --git a/.github/workflows/build-test.yml b/.github/workflows/build-test.yml index 3a0d0d6..8914e78 100644 --- a/.github/workflows/build-test.yml +++ b/.github/workflows/build-test.yml @@ -72,6 +72,10 @@ jobs: CLOUD_PROVIDER: ${{ matrix.runConfig.cloud }} TEST_GROUPS: ${{ matrix.runConfig.testGroups }} run: ci\\test_windows.bat + - uses: codecov/codecov-action@v4 + with: + fail_ci_if_error: true + token: ${{ secrets.CODECOV_TOKEN }} test-mac: needs: build @@ -111,6 +115,10 @@ jobs: CLOUD_PROVIDER: ${{ matrix.runConfig.cloud }} TEST_GROUPS: ${{ matrix.runConfig.testGroups }} run: bash ./ci/test.sh + - uses: codecov/codecov-action@v4 + with: + fail_ci_if_error: true + token: ${{ secrets.CODECOV_TOKEN }} test-linux: needs: build @@ -147,3 +155,7 @@ jobs: CLOUD_PROVIDER: ${{ matrix.runConfig.cloud }} TEST_GROUPS: ${{ matrix.runConfig.testGroups }} run: ./ci/test.sh + - uses: codecov/codecov-action@v4 + with: + fail_ci_if_error: true + token: ${{ secrets.CODECOV_TOKEN }} diff --git a/README.md b/README.md index a5c519e..0990314 100644 --- a/README.md +++ b/README.md @@ -1,5 +1,7 @@ # snowflake-hibernate +[![codecov](https://codecov.io/gh/snowflakedb/snowflake-hibernate/graph/badge.svg?token=J8TOYZ6SZK)](https://codecov.io/gh/snowflakedb/snowflake-hibernate) + ## Brief This project is an SQL dialect definition for Hibernate Core enabling Java developers to reuse ORM features with Snowflake database. diff --git a/pom.xml b/pom.xml index 9e93e74..5a603be 100644 --- a/pom.xml +++ b/pom.xml @@ -16,6 +16,7 @@ 8 8 6.4.4.Final + 0.8.12 5.10.2 5.10.2 2.23.0 @@ -108,6 +109,33 @@ fmt-maven-plugin ${fmt.plugin.version} + + org.jacoco + jacoco-maven-plugin + ${jacoco-maven-plugin.version} + + + pre-test + + prepare-agent + + + target/jacoco-tests.exec + + + + post-test + + report + + test + + target/jacoco-tests.exec + target/jacoco-tests + + + + @@ -176,14 +204,14 @@ maven-failsafe-plugin ${testGroups} - --add-opens=java.base/java.io=ALL-UNNAMED --add-opens=java.base/java.nio=ALL-UNNAMED --add-opens=java.base/java.lang=ALL-UNNAMED --add-opens=java.base/java.lang.reflect=ALL-UNNAMED --add-opens=java.base/java.util=ALL-UNNAMED --add-opens=java.base/sun.util.calendar=ALL-UNNAMED --add-exports=java.base/sun.nio.ch=ALL-UNNAMED --add-exports=jdk.unsupported/sun.misc=ALL-UNNAMED + ${argLine} --add-opens=java.base/java.io=ALL-UNNAMED --add-opens=java.base/java.nio=ALL-UNNAMED --add-opens=java.base/java.lang=ALL-UNNAMED --add-opens=java.base/java.lang.reflect=ALL-UNNAMED --add-opens=java.base/java.util=ALL-UNNAMED --add-opens=java.base/sun.util.calendar=ALL-UNNAMED --add-exports=java.base/sun.nio.ch=ALL-UNNAMED --add-exports=jdk.unsupported/sun.misc=ALL-UNNAMED maven-surefire-plugin ${testGroups} - --add-opens=java.base/java.io=ALL-UNNAMED --add-opens=java.base/java.nio=ALL-UNNAMED --add-opens=java.base/java.lang=ALL-UNNAMED --add-opens=java.base/java.lang.reflect=ALL-UNNAMED --add-opens=java.base/java.util=ALL-UNNAMED --add-opens=java.base/sun.util.calendar=ALL-UNNAMED --add-exports=java.base/sun.nio.ch=ALL-UNNAMED --add-exports=jdk.unsupported/sun.misc=ALL-UNNAMED + ${argLine} --add-opens=java.base/java.io=ALL-UNNAMED --add-opens=java.base/java.nio=ALL-UNNAMED --add-opens=java.base/java.lang=ALL-UNNAMED --add-opens=java.base/java.lang.reflect=ALL-UNNAMED --add-opens=java.base/java.util=ALL-UNNAMED --add-opens=java.base/sun.util.calendar=ALL-UNNAMED --add-exports=java.base/sun.nio.ch=ALL-UNNAMED --add-exports=jdk.unsupported/sun.misc=ALL-UNNAMED