From aac3aefcb6536ccae40cc8ecd7f1b8a2466c70c5 Mon Sep 17 00:00:00 2001 From: "xiaolong.ran" Date: Wed, 2 Sep 2020 11:55:35 +0800 Subject: [PATCH] Ignore unit-tests ci when the pull requeat only change doc Signed-off-by: xiaolong.ran --- .github/workflows/ci-unit.yaml | 12 ++++++++++++ 1 file changed, 12 insertions(+) diff --git a/.github/workflows/ci-unit.yaml b/.github/workflows/ci-unit.yaml index 6f18c98dbaa11..8eb023b7712fa 100644 --- a/.github/workflows/ci-unit.yaml +++ b/.github/workflows/ci-unit.yaml @@ -42,22 +42,34 @@ jobs: fetch-depth: 0 ref: ${{ github.event.pull_request.head.sha }} + - name: Check if this pull request only changes documentation + id: docs + uses: apache/pulsar-test-infra/diff-only@master + with: + args: site2 deployment .asf.yaml .ci ct.yaml + - name: build and run unit tests exclude pulsar-broker and pulsar-proxy + if: steps.docs.outputs.changed_only == 'no' run: ./build/retry.sh mvn -B -ntp install -PbrokerSkipTest -Dexclude="org/apache/pulsar/proxy/**/*.java,**/KafkaProducerSimpleConsumerTest.java,**/ManagedLedgerTest.java,**/TestPulsarKeyValueSchemaHandler.java,**/PrimitiveSchemaTest.java,**/BlobStoreManagedLedgerOffloaderTest.java" - name: run flaky test "**/ManagedLedgerTest.java" + if: steps.docs.outputs.changed_only == 'no' run: ./build/retry.sh mvn -B -ntp test -pl managed-ledger -Dinclude="**/ManagedLedgerTest.java" -DtestForkCount=1 -DtestReuseFork=true - name: run flaky test "**/KafkaProducerSimpleConsumerTest.java" + if: steps.docs.outputs.changed_only == 'no' run: ./build/retry.sh mvn -B -ntp test -pl pulsar-client-kafka-compat/pulsar-client-kafka_0_8 -Dinclude="**/KafkaProducerSimpleConsumerTest.java" -DtestForkCount=1 -DtestReuseFork=true - name: run flaky test "**/TestPulsarKeyValueSchemaHandler.java" + if: steps.docs.outputs.changed_only == 'no' run: ./build/retry.sh mvn -B -ntp test -pl pulsar-sql/presto-pulsar-plugin -Dinclude="**/TestPulsarKeyValueSchemaHandler.java" -DtestForkCount=1 -DtestReuseFork=true - name: run flaky test "**/PrimitiveSchemaTest.java" + if: steps.docs.outputs.changed_only == 'no' run: ./build/retry.sh mvn -B -ntp test -pl pulsar-client -Dinclude="**/PrimitiveSchemaTest.java" -DtestForkCount=1 -DtestReuseFork=true - name: run flaky test "**/BlobStoreManagedLedgerOffloaderTest.java" + if: steps.docs.outputs.changed_only == 'no' run: ./build/retry.sh mvn -B -ntp test -pl tiered-storage/jcloud -Dinclude="**/BlobStoreManagedLedgerOffloaderTest.java" -DtestForkCount=1 -DtestReuseFork=true - name: package surefire artifacts