From ffcee97afe8662f28999038a0ca6ec85af03e7cb Mon Sep 17 00:00:00 2001 From: Cheng Pan Date: Sun, 10 Dec 2023 23:58:59 +0800 Subject: [PATCH] [KYUUBI #5837] [INFRA] Only enable Jacoco with explicit profile MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit # :mag: Description ## Issue References ๐Ÿ”— Currently, we always enable Jacoco, which would add additional building time and produce lots of HTML files, also increase the IDEA indexing burden. image ## Describe Your Solution ๐Ÿ”ง Add a new maven profile `codecov`, only enable it in CI with codecov enabled. ## Types of changes :bookmark: - [ ] Bugfix (non-breaking change which fixes an issue) - [ ] New feature (non-breaking change which adds functionality) - [ ] Breaking change (fix or feature that would cause existing functionality to change) ## Test Plan ๐Ÿงช See CI result. --- # Checklists ## ๐Ÿ“ Author Self Checklist - [x] My code follows the [style guidelines](https://kyuubi.readthedocs.io/en/master/contributing/code/style.html) of this project - [x] I have performed a self-review - [ ] I have commented my code, particularly in hard-to-understand areas - [ ] I have made corresponding changes to the documentation - [x] My changes generate no new warnings - [ ] I have added tests that prove my fix is effective or that my feature works - [x] New and existing unit tests pass locally with my changes - [x] This patch was not authored or co-authored using [Generative Tooling](https://www.apache.org/legal/generative-tooling.html) ## ๐Ÿ“ Committer Pre-Merge Checklist - [x] Pull request title is okay. - [x] No license issues. - [x] Milestone correctly set? - [x] Test coverage is ok - [x] Assignees are selected. - [x] Minimum number of approvals - [x] No changes are requested **Be nice. Be informative.** Closes #5837 from pan3793/codecov. Closes #5837 97d0b22de [Cheng Pan] fi c60367dd1 [Cheng Pan] fix a0e8910bc [Cheng Pan] Only enable Jacoco with explicit profile Authored-by: Cheng Pan Signed-off-by: Cheng Pan --- .github/workflows/master.yml | 3 +++ dev/kyuubi-codecov/pom.xml | 46 ++++++++++++++++++++---------------- pom.xml | 17 +++++++++---- 3 files changed, 41 insertions(+), 25 deletions(-) diff --git a/.github/workflows/master.yml b/.github/workflows/master.yml index c51fdabf9..47147a9b9 100644 --- a/.github/workflows/master.yml +++ b/.github/workflows/master.yml @@ -106,6 +106,9 @@ jobs: python-version: '3.9' - name: Build and test Kyuubi and Spark with maven w/o linters run: | + if [[ "${{ matrix.java }}" == "8" && "${{ matrix.spark }}" == "3.4" && "${{ matrix.spark-archive }}" == "" ]]; then + MVN_OPT="${MVN_OPT} -Pcodecov" + fi TEST_MODULES="dev/kyuubi-codecov" ./build/mvn clean install ${MVN_OPT} -pl ${TEST_MODULES} -am \ -Pjava-${{ matrix.java }} -Pspark-${{ matrix.spark }} -Pspark-authz-hudi-test ${{ matrix.spark-archive }} ${{ matrix.exclude-tags }} diff --git a/dev/kyuubi-codecov/pom.xml b/dev/kyuubi-codecov/pom.xml index 0f22c3316..cdf798273 100644 --- a/dev/kyuubi-codecov/pom.xml +++ b/dev/kyuubi-codecov/pom.xml @@ -142,26 +142,6 @@ - - org.jacoco - jacoco-maven-plugin - - - report-agg - - report-aggregate - - verify - - - **/jacoco*.exec - - ${project.reporting.outputDirectory}/jacoco-aggregate-all - - - - - org.apache.maven.plugins maven-dependency-plugin @@ -241,5 +221,31 @@ + + codecov + + + + org.jacoco + jacoco-maven-plugin + + + report-agg + + report-aggregate + + verify + + + **/jacoco*.exec + + ${project.reporting.outputDirectory}/jacoco-aggregate-all + + + + + + + diff --git a/pom.xml b/pom.xml index 82c921a13..62791a068 100644 --- a/pom.xml +++ b/pom.xml @@ -2058,11 +2058,6 @@ spotless-maven-plugin - - org.jacoco - jacoco-maven-plugin - - org.apache.maven.plugins maven-antrun-plugin @@ -2426,6 +2421,18 @@ + + codecov + + + + org.jacoco + jacoco-maven-plugin + + + + + apache-release