Skip to content

Commit

Permalink
SNOW-1735927: Add code coverage (#12)
Browse files Browse the repository at this point in the history
  • Loading branch information
sfc-gh-pbulawa authored Oct 21, 2024
1 parent f94a517 commit e43f7ac
Show file tree
Hide file tree
Showing 3 changed files with 44 additions and 2 deletions.
12 changes: 12 additions & 0 deletions .github/workflows/build-test.yml
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down Expand Up @@ -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
Expand Down Expand Up @@ -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 }}
2 changes: 2 additions & 0 deletions README.md
Original file line number Diff line number Diff line change
@@ -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.
Expand Down
32 changes: 30 additions & 2 deletions pom.xml
Original file line number Diff line number Diff line change
Expand Up @@ -16,6 +16,7 @@
<maven.compiler.source>8</maven.compiler.source>
<maven.compiler.target>8</maven.compiler.target>
<hibernate-core.version>6.4.4.Final</hibernate-core.version>
<jacoco-maven-plugin.version>0.8.12</jacoco-maven-plugin.version>
<junit-jupiter-engine.version>5.10.2</junit-jupiter-engine.version>
<junit-jupiter-params.version>5.10.2</junit-jupiter-params.version>
<log4j-slf4j2-impl.version>2.23.0</log4j-slf4j2-impl.version>
Expand Down Expand Up @@ -108,6 +109,33 @@
<artifactId>fmt-maven-plugin</artifactId>
<version>${fmt.plugin.version}</version>
</plugin>
<plugin>
<groupId>org.jacoco</groupId>
<artifactId>jacoco-maven-plugin</artifactId>
<version>${jacoco-maven-plugin.version}</version>
<executions>
<execution>
<id>pre-test</id>
<goals>
<goal>prepare-agent</goal>
</goals>
<configuration>
<destFile>target/jacoco-tests.exec</destFile>
</configuration>
</execution>
<execution>
<id>post-test</id>
<goals>
<goal>report</goal>
</goals>
<phase>test</phase>
<configuration>
<dataFile>target/jacoco-tests.exec</dataFile>
<outputDirectory>target/jacoco-tests</outputDirectory>
</configuration>
</execution>
</executions>
</plugin>
</plugins>
</build>

Expand Down Expand Up @@ -176,14 +204,14 @@
<artifactId>maven-failsafe-plugin</artifactId>
<configuration>
<groups>${testGroups}</groups>
<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</argLine>
<argLine>${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</argLine>
</configuration>
</plugin>
<plugin>
<artifactId>maven-surefire-plugin</artifactId>
<configuration>
<groups>${testGroups}</groups>
<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</argLine>
<argLine>${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</argLine>
</configuration>
</plugin>
</plugins>
Expand Down

0 comments on commit e43f7ac

Please sign in to comment.