Skip to content

World's most powerful open data catalog for building a high-performance, geo-distributed and federated metadata lake.

[#968] improvement(ci): Run the pipeline only if there are changes about the files which are not document (#967)

qqqttt123b4d642cb70f0
diff --git a/.github/workflows/build.yml b/.github/workflows/build.yml
index f3923999e4..e4cd446680 100644
--- a/.github/workflows/build.yml
+++ b/.github/workflows/build.yml
@@ -14,12 +14,45 @@ concurrency:
# A workflow run is made up of one or more jobs that can run sequentially or in parallel
jobs:
+ changes:
+ runs-on: ubuntu-latest
+ steps:
+ - uses: actions/checkout@v3
+ - uses: dorny/paths-filter@v2
+ id: filter
+ with:
+ filters: |
+ source_changes:
+ - .github/**
+ - api/**
+ - bin/**
+ - catalogs/**
+ - clients/**
+ - common/**
+ - conf/**
+ - core/**
+ - dev/**
+ - gradle/**
+ - integration-test/**
+ - meta/**
+ - server/**
+ - server-common/**
+ - trino-connector/**
+ - web/**
+ - build.gradle.kts
+ - gradle.properties
+ - gradlew
+ - setting.gradle.kts
+ outputs:
+ source_changes: ${{ steps.filter.outputs.source_changes }}
+
# This workflow contains a single job called "build"
build:
# The type of runner that the job will run on
runs-on: ubuntu-latest
timeout-minutes: 30
-
+ needs: changes
+ if: needs.changes.outputs.source_changes == 'true'
# Steps represent a sequence of tasks that will be executed as part of the job
steps:
# Checks-out your repository under $GITHUB_WORKSPACE, so your job can access it
diff --git a/.github/workflows/integration-test.yml b/.github/workflows/integration-test.yml
index e05bfb2470..14697c8a97 100644
--- a/.github/workflows/integration-test.yml
+++ b/.github/workflows/integration-test.yml
@@ -13,8 +13,42 @@ concurrency:
cancel-in-progress: ${{ github.event_name == 'pull_requests' }}
jobs:
+ changes:
+ runs-on: ubuntu-latest
+ steps:
+ - uses: actions/checkout@v3
+ - uses: dorny/paths-filter@v2
+ id: filter
+ with:
+ filters: |
+ source_changes:
+ - .github/**
+ - api/**
+ - bin/**
+ - catalogs/**
+ - clients/**
+ - common/**
+ - conf/**
+ - core/**
+ - dev/**
+ - gradle/**
+ - integration-test/**
+ - meta/**
+ - server/**
+ - server-common/**
+ - trino-connector/**
+ - web/**
+ - build.gradle.kts
+ - gradle.properties
+ - gradlew
+ - setting.gradle.kts
+ outputs:
+ source_changes: ${{ steps.filter.outputs.source_changes }}
+
# Integration test for AMD64 architecture
test-amd64-arch:
+ needs: changes
+ if: needs.changes.outputs.source_changes == 'true'
runs-on: ubuntu-latest
timeout-minutes: 30
strategy: