diff --git a/.dockerignore b/.dockerignore index e9401f0cc9e..0e3b22687d0 100644 --- a/.dockerignore +++ b/.dockerignore @@ -1,2 +1,3 @@ docs +!docs/coverage charts diff --git a/.github/workflows/unit_tests.yml b/.github/workflows/unit_tests.yml index 2044396a84c..f71788a90bb 100644 --- a/.github/workflows/unit_tests.yml +++ b/.github/workflows/unit_tests.yml @@ -16,7 +16,11 @@ jobs: restore-keys: | ${{ runner.os }}-maven- - name: test java - run: make test-java + run: make test-java-with-coverage + - uses: actions/upload-artifact@v2 + with: + name: java-coverage-report + path: ${{ github.workspace }}/docs/coverage/java/target/site/jacoco-aggregate/ unit-test-python: runs-on: ubuntu-latest diff --git a/Makefile b/Makefile index 5cf5ae78ced..1f41ad09049 100644 --- a/Makefile +++ b/Makefile @@ -46,6 +46,9 @@ lint-java: test-java: mvn test +test-java-with-coverage: + mvn test jacoco:report-aggregate + build-java: mvn clean verify @@ -158,4 +161,4 @@ build-html: clean-html # Build Python SDK documentation $(MAKE) compile-protos-python cd $(ROOT_DIR)/sdk/python/docs && $(MAKE) html - cp -r $(ROOT_DIR)/sdk/python/docs/html/* $(ROOT_DIR)/dist/python \ No newline at end of file + cp -r $(ROOT_DIR)/sdk/python/docs/html/* $(ROOT_DIR)/dist/python diff --git a/core/pom.xml b/core/pom.xml index f4fb6c659c0..2f616d5ed41 100644 --- a/core/pom.xml +++ b/core/pom.xml @@ -32,6 +32,11 @@ + + org.jacoco + jacoco-maven-plugin + + org.springframework.boot spring-boot-maven-plugin @@ -195,7 +200,6 @@ org.mockito mockito-core - 2.23.0 test diff --git a/docs/coverage/java/pom.xml b/docs/coverage/java/pom.xml new file mode 100644 index 00000000000..05ffaf374e0 --- /dev/null +++ b/docs/coverage/java/pom.xml @@ -0,0 +1,111 @@ + + + + 4.0.0 + + + + + dev.feast + feast-parent + ${revision} + ../../.. + + + Feast Coverage Java + feast-coverage + + + true + + + + + dev.feast + feast-storage-api + ${project.version} + + + + dev.feast + feast-storage-connector-bigquery + ${project.version} + + + + dev.feast + feast-storage-connector-redis + ${project.version} + + + + dev.feast + feast-storage-connector-redis-cluster + ${project.version} + + + + dev.feast + feast-ingestion + ${project.version} + + + + dev.feast + feast-core + ${project.version} + + + + dev.feast + feast-serving + ${project.version} + + + + dev.feast + feast-sdk + ${project.version} + + + + + + + org.jacoco + jacoco-maven-plugin + + + report-aggregate + prepare-package + + report-aggregate + + + + + + + + diff --git a/ingestion/pom.xml b/ingestion/pom.xml index 64d5a41f86f..5a2fba8d658 100644 --- a/ingestion/pom.xml +++ b/ingestion/pom.xml @@ -91,6 +91,11 @@ + + + org.jacoco + jacoco-maven-plugin + diff --git a/pom.xml b/pom.xml index 7b7cd1d0fed..b62c9137921 100644 --- a/pom.xml +++ b/pom.xml @@ -35,6 +35,7 @@ core serving sdk/java + docs/coverage/java @@ -471,9 +472,9 @@ org.apache.maven.plugins maven-surefire-plugin - 2.22.1 + 3.0.0-M4 - -Xms2048m -Xmx2048m -Djdk.net.URLClassPath.disableClassPathURLCheck=true + @{argLine} -Xms2048m -Xmx2048m -Djdk.net.URLClassPath.disableClassPathURLCheck=true IntegrationTest @@ -614,6 +615,18 @@ false + + org.jacoco + jacoco-maven-plugin + 0.8.5 + + + + prepare-agent + + + + org.springframework.boot spring-boot-maven-plugin diff --git a/sdk/java/pom.xml b/sdk/java/pom.xml index e8a82a485fc..75d82edcc01 100644 --- a/sdk/java/pom.xml +++ b/sdk/java/pom.xml @@ -94,12 +94,8 @@ - maven-surefire-plugin - 2.22.2 - - - maven-failsafe-plugin - 2.22.2 + org.jacoco + jacoco-maven-plugin diff --git a/serving/pom.xml b/serving/pom.xml index d3d7ae212fd..3754777da07 100644 --- a/serving/pom.xml +++ b/serving/pom.xml @@ -40,6 +40,11 @@ + + org.jacoco + jacoco-maven-plugin + + org.springframework.boot spring-boot-maven-plugin @@ -248,11 +253,9 @@ test - org.mockito mockito-core - 2.23.0 test diff --git a/storage/connectors/pom.xml b/storage/connectors/pom.xml index b57fe98cd25..280b0d40bf1 100644 --- a/storage/connectors/pom.xml +++ b/storage/connectors/pom.xml @@ -32,6 +32,11 @@ + + + org.jacoco + jacoco-maven-plugin +