World's most powerful open data catalog for building a high-performance, geo-distributed and federated metadata lake.
Java ai-catalogdata-catalogdatalakefederated-querylakehousemetadatametalakemodel-catalogopendatacatalogskycomputingstratosphere
[#10611] improve(ci): Add GitHub Actions integration test workflow for the maintenance module (#10612)
MaSaia04ef143eefa
diff --git a/.github/workflows/maintenance-integration-test-action.yml b/.github/workflows/maintenance-integration-test-action.ymlnew file mode 100644index 0000000000..c9829cf54b--- /dev/null+++ b/.github/workflows/maintenance-integration-test-action.yml@@ -0,0 +1,64 @@+name: Maintenance Integration Test Action++# run maintenance integration test+on:+ workflow_call:+ inputs:+ architecture:+ required: true+ description: 'Architecture of the platform'+ type: string+ java-version:+ required: true+ description: 'Java version'+ type: string++jobs:+ start-runner:+ name: JDK${{ inputs.java-version }}+ runs-on: ubuntu-latest+ timeout-minutes: 60+ env:+ PLATFORM: ${{ inputs.architecture }}+ steps:+ - uses: actions/checkout@v4++ - uses: actions/setup-java@v4+ with:+ java-version: ${{ inputs.java-version }}+ distribution: 'temurin'+ cache: 'gradle'++ - name: Set up QEMU+ uses: docker/setup-qemu-action@ce360397dd3f832beb865e1373c09c0e9f86d70a # v4.0.0++ - name: Check required command+ run: |+ dev/ci/check_commands.sh++ - name: Package Gravitino+ run: |+ ./gradlew compileDistribution -x test++ - name: Free up disk space+ run: |+ dev/ci/util_free_space.sh++ - name: Maintenance Integration Test+ id: integrationTest+ # run embedded mode and deploy mode integration tests+ run: |+ ./gradlew -PskipTests -PtestMode=embedded -PskipDockerTests=false :maintenance:optimizer:test --tests "org.apache.gravitino.maintenance.optimizer.integration.test.**"+ ./gradlew -PskipTests -PtestMode=deploy -PskipDockerTests=false :maintenance:optimizer:test --tests "org.apache.gravitino.maintenance.optimizer.integration.test.**"++ - name: Upload integrate tests reports+ uses: actions/upload-artifact@v7+ if: ${{ (failure() && steps.integrationTest.outcome == 'failure') || contains(github.event.pull_request.labels.*.name, 'upload log') }}+ with:+ name: maintenance-integrate-test-reports-${{ inputs.java-version }}+ path: |+ build/reports+ maintenance/optimizer/build/*.log+ maintenance/optimizer/build/*.tar+ distribution/package/logs/gravitino-server.out+ distribution/package/logs/gravitino-server.logdiff --git a/.github/workflows/maintenance-integration-test.yml b/.github/workflows/maintenance-integration-test.ymlnew file mode 100644index 0000000000..034fa79972--- /dev/null+++ b/.github/workflows/maintenance-integration-test.yml@@ -0,0 +1,70 @@+name: Maintenance Integration Test++# Controls when the workflow will run+on:+ push:+ branches: [ "main", "branch-*" ]+ pull_request:+ branches: [ "main", "branch-*" ]++concurrency:+ group: ${{ github.workflow }}-${{ github.event.pull_request.number || github.ref }}+ cancel-in-progress: true++jobs:+ changes:+ runs-on: ubuntu-latest+ steps:+ - uses: actions/checkout@v4+ - uses: dorny/paths-filter@de90cc6fb38fc0963ad72b210f1f284cd68cea36+ id: filter+ with:+ filters: |+ source_changes:+ - .github/**+ - api/**+ - bin/**+ - catalogs/catalog-common/**+ - clients/client-java/**+ - clients/client-java-runtime/**+ - common/**+ - conf/**+ - core/**+ - dev/**+ - gradle/**+ - integration-test-common/**+ - maintenance/**+ - meta/**+ - scripts/**+ - server/**+ - server-common/**+ - build.gradle.kts+ - gradle.properties+ - gradlew+ - settings.gradle.kts+ outputs:+ source_changes: ${{ steps.filter.outputs.source_changes }}++ MaintenanceIT-on-push:+ needs: changes+ if: (github.event_name == 'push' && needs.changes.outputs.source_changes == 'true')+ strategy:+ matrix:+ architecture: [linux/amd64]+ java-version: [ 17 ]+ uses: ./.github/workflows/maintenance-integration-test-action.yml+ with:+ architecture: ${{ matrix.architecture }}+ java-version: ${{ matrix.java-version }}++ MaintenanceIT-on-pr:+ needs: changes+ if: (github.event_name == 'pull_request' && needs.changes.outputs.source_changes == 'true')+ strategy:+ matrix:+ architecture: [linux/amd64]+ java-version: [ 17 ]+ uses: ./.github/workflows/maintenance-integration-test-action.yml+ with:+ architecture: ${{ matrix.architecture }}+ java-version: ${{ matrix.java-version }}