From c5181caeeff9e25705ec75619c8688da655bad1a Mon Sep 17 00:00:00 2001 From: dhruvinmaniar123 Date: Mon, 27 Nov 2023 16:42:04 +0530 Subject: [PATCH 1/3] optimise the CIs --- .github/workflows/maven-postgres-tests-build.yml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.github/workflows/maven-postgres-tests-build.yml b/.github/workflows/maven-postgres-tests-build.yml index 53213ed80d3d..6dea59a4183e 100644 --- a/.github/workflows/maven-postgres-tests-build.yml +++ b/.github/workflows/maven-postgres-tests-build.yml @@ -111,7 +111,7 @@ jobs: env: GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }} if: ${{ github.event_name == 'push' }} - run: mvn clean package + run: mvn -q -DskipTests clean package - name: Clean Up run: | From 54604878726ac0f6b6b7980b616b54a5976f6e5b Mon Sep 17 00:00:00 2001 From: Akash-Jain Date: Fri, 1 Dec 2023 16:33:53 +0530 Subject: [PATCH 2/3] fix: Update maven CI workflow commands --- .github/workflows/maven-build.yml | 11 +---------- .github/workflows/maven-postgres-tests-build.yml | 11 +---------- .github/workflows/maven-sonar-build.yml | 11 +---------- 3 files changed, 3 insertions(+), 30 deletions(-) diff --git a/.github/workflows/maven-build.yml b/.github/workflows/maven-build.yml index d292a1815d07..dbce4406ae7d 100644 --- a/.github/workflows/maven-build.yml +++ b/.github/workflows/maven-build.yml @@ -99,20 +99,11 @@ jobs: sudo apt-get install -y unixodbc-dev python3-venv librdkafka-dev gcc libsasl2-dev build-essential libssl-dev libffi-dev \ librdkafka-dev unixodbc-dev libevent-dev jq sudo make install_antlr_cli - - - name: Build PR with Maven - env: - GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }} - if: ${{ github.event_name == 'pull_request_target' }} - run: | - git fetch --no-tags https://github.com/open-metadata/OpenMetadata.git +refs/heads/main:refs/remotes/origin/main - mvn -pl :openmetadata-service clean package -am - name: Build with Maven env: GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }} - if: ${{ github.event_name == 'push' || github.event_name == 'workflow_dispatch' }} - run: mvn -Dsonar.login=${{ secrets.SONAR_TOKEN }} clean package + run: mvn clean package -am - name: Clean Up run: | diff --git a/.github/workflows/maven-postgres-tests-build.yml b/.github/workflows/maven-postgres-tests-build.yml index 6dea59a4183e..729658611b74 100644 --- a/.github/workflows/maven-postgres-tests-build.yml +++ b/.github/workflows/maven-postgres-tests-build.yml @@ -98,20 +98,11 @@ jobs: sudo apt-get install -y unixodbc-dev python3-venv librdkafka-dev gcc libsasl2-dev build-essential libssl-dev libffi-dev \ librdkafka-dev unixodbc-dev libevent-dev jq sudo make install_antlr_cli - - - name: Build PR with Maven - env: - GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }} - if: ${{ github.event_name == 'pull_request_target' }} - run: | - git fetch --no-tags https://github.com/open-metadata/OpenMetadata.git +refs/heads/main:refs/remotes/origin/main - mvn -pl :openmetadata-service -Ppostgres-tests clean package -am - name: Build with Maven env: GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }} - if: ${{ github.event_name == 'push' }} - run: mvn -q -DskipTests clean package + run: mvn -Ppostgres-tests clean package -am - name: Clean Up run: | diff --git a/.github/workflows/maven-sonar-build.yml b/.github/workflows/maven-sonar-build.yml index 0f7aa571870b..8c784e5b7a66 100644 --- a/.github/workflows/maven-sonar-build.yml +++ b/.github/workflows/maven-sonar-build.yml @@ -99,20 +99,11 @@ jobs: sudo apt-get install -y unixodbc-dev python3-venv librdkafka-dev gcc libsasl2-dev build-essential libssl-dev libffi-dev \ librdkafka-dev unixodbc-dev libevent-dev jq sudo make install_antlr_cli - - - name: Build PR with Maven - env: - GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }} - if: ${{ github.event_name == 'pull_request_target' }} - run: | - git fetch --no-tags https://github.com/open-metadata/OpenMetadata.git +refs/heads/main:refs/remotes/origin/main - mvn -pl :openmetadata-service -Pstatic-code-analysis clean package -am - name: Build with Maven env: GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }} - if: ${{ github.event_name == 'push' || github.event_name == 'workflow_dispatch' }} - run: mvn -Dsonar.login=${{ secrets.SONAR_TOKEN }} -Pstatic-code-analysis -DskipTests clean package + run: mvn -Pstatic-code-analysis clean package -am - name: Clean Up run: | From 234e1977fa1fde1676ab3e9620eb976550115032 Mon Sep 17 00:00:00 2001 From: Akash-Jain Date: Fri, 1 Dec 2023 17:00:41 +0530 Subject: [PATCH 3/3] fix: CI Name for maven-build-skip.yaml --- .github/workflows/maven-build-skip.yml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.github/workflows/maven-build-skip.yml b/.github/workflows/maven-build-skip.yml index cbb5f55c8fa1..4fdb92754f93 100644 --- a/.github/workflows/maven-build-skip.yml +++ b/.github/workflows/maven-build-skip.yml @@ -12,7 +12,7 @@ # Avoid running Maven CI on each PR opened which does not modify Java or UI code # https://docs.github.com/en/repositories/configuring-branches-and-merges-in-your-repository/defining-the-mergeability- # of-pull-requests/troubleshooting-required-status-checks#handling-skipped-but-required-checks -name: Maven CI +name: Maven MySQL Tests CI on: pull_request_target: