diff --git a/.github/workflows/pulsar-ci.yaml b/.github/workflows/pulsar-ci.yaml index 9005fcaa46635..d095178cfaae3 100644 --- a/.github/workflows/pulsar-ci.yaml +++ b/.github/workflows/pulsar-ci.yaml @@ -217,6 +217,12 @@ jobs: if: ${{ always() }} uses: ./.github/actions/copy-test-reports + - name: Upload to Codecov + uses: codecov/codecov-action@v3 + continue-on-error: true + with: + flags: unittests + - name: Publish Test Report uses: apache/pulsar-test-infra/action-junit-report@master if: ${{ always() }} diff --git a/build/run_unit_group.sh b/build/run_unit_group.sh index 87836261609b2..6d8cafbee2c7f 100755 --- a/build/run_unit_group.sh +++ b/build/run_unit_group.sh @@ -24,7 +24,7 @@ set -e set -o pipefail set -o errexit -MVN_TEST_OPTIONS='mvn -B -ntp -DskipSourceReleaseAssembly=true -DskipBuildDistribution=true -Dspotbugs.skip=true -Dlicense.skip=true -Dcheckstyle.skip=true -Drat.skip=true' +MVN_TEST_OPTIONS='mvn -Pcoverage -B -ntp -DskipSourceReleaseAssembly=true -DskipBuildDistribution=true -Dspotbugs.skip=true -Dlicense.skip=true -Dcheckstyle.skip=true -Drat.skip=true' function mvn_test() { ( @@ -129,7 +129,7 @@ function test_group_proxy() { function test_group_other() { mvn_test --clean --install \ - -pl '!org.apache.pulsar:distribution,!org.apache.pulsar:pulsar-offloader-distribution,!org.apache.pulsar:pulsar-server-distribution,!org.apache.pulsar:pulsar-io-distribution' \ + -pl '!org.apache.pulsar:distribution,!org.apache.pulsar:pulsar-offloader-distribution,!org.apache.pulsar:pulsar-server-distribution,!org.apache.pulsar:pulsar-io-distribution,!org.apache.pulsar:pulsar-all-docker-image' \ -PskipTestsForUnitGroupOther -DdisableIoMainProfile=true -DdisableSqlMainProfile=true -DskipIntegrationTests \ -Dexclude='**/ManagedLedgerTest.java, **/OffloadersCacheTest.java diff --git a/codecov.yml b/codecov.yml new file mode 100644 index 0000000000000..b1dccd3742428 --- /dev/null +++ b/codecov.yml @@ -0,0 +1,39 @@ +# +# Licensed to the Apache Software Foundation (ASF) under one +# or more contributor license agreements. See the NOTICE file +# distributed with this work for additional information +# regarding copyright ownership. The ASF licenses this file +# to you under the Apache License, Version 2.0 (the +# "License"); you may not use this file except in compliance +# with the License. You may obtain a copy of the License at +# +# http://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, +# software distributed under the License is distributed on an +# "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY +# KIND, either express or implied. See the License for the +# specific language governing permissions and limitations +# under the License. +# + +codecov: + require_ci_to_pass: yes + +comment: + layout: "reach, diff, flags, files" + behavior: default + require_changes: false + require_base: no + require_head: yes + +coverage: + status: + patch: + default: + target: auto + informational: true + project: + default: + target: auto + informational: true diff --git a/pom.xml b/pom.xml index bedda974df24d..8fbc816475620 100644 --- a/pom.xml +++ b/pom.xml @@ -1924,7 +1924,9 @@ flexible messaging model and an intuitive client API. report - target/report + + META-INF/** +