Ignore unit-tests ci when the pull requeat only change doc
@@ -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
