diff --git a/.github/workflows/java-cdk-tests.yml b/.github/workflows/java-cdk-tests.yml index 96f23e6db13a..c679f7de3b97 100644 --- a/.github/workflows/java-cdk-tests.yml +++ b/.github/workflows/java-cdk-tests.yml @@ -33,22 +33,34 @@ jobs: - id: changes uses: dorny/paths-filter@v2 with: - # Note: expressions within a filter are OR'ed filters: | java: - 'airbyte-cdk/java/**/*' - 'airbyte-cdk/bulk/**/*' - run-check: + changes-in-bulk: + name: Detect Changes in Bulk + runs-on: ubuntu-24.04 + outputs: + java: ${{ steps.changes-in-bulk.outputs.java }} + + steps: + - name: Checkout Airbyte + if: github.event_name != 'pull_request' + uses: actions/checkout@v4 + - id: changes-in-bulk + uses: dorny/paths-filter@v2 + with: + filters: | + java: + - 'airbyte-cdk/bulk/**/*' + + run-check-bulk-cdk-version: needs: - - changes - if: needs.changes.outputs.java == 'true' - # As of now, 16 cores seems to be enough. - # Any revision upwards should be based on a performance analysis of gradle scans. - # See https://github.com/airbytehq/airbyte/pull/36055 for an example of this, - # which explains why which we went down from 64 cores to 16. + - changes-in-bulk + if: needs.changes-in-bulk.outputs.java == 'true' runs-on: linux-24.04-large # Custom runner, defined in GitHub org settings - name: CDK Check + name: Bulk CDK version check timeout-minutes: 60 steps: - name: Checkout Airbyte @@ -59,15 +71,35 @@ jobs: distribution: "zulu" java-version: "21" # Help CDK Devs understand CDK version should be incremented on changes. - - name: Error if CDK Version Exists + - name: Check that bulk CDK version is incremented uses: burrunan/gradle-cache-action@v1 env: CI: true with: - job-id: bulk-cdk-publish + job-id: bulk-cdk-version-check concurrent: true gradle-distribution-sha-256-sum-warning: false arguments: --scan :airbyte-cdk:bulk:checkBuildNumber + + run-check: + needs: + - changes + if: needs.changes.outputs.java == 'true' + # As of now, 16 cores seems to be enough. + # Any revision upwards should be based on a performance analysis of gradle scans. + # See https://github.com/airbytehq/airbyte/pull/36055 for an example of this, + # which explains why which we went down from 64 cores to 16. + runs-on: linux-24.04-large # Custom runner, defined in GitHub org settings + name: CDK Check + timeout-minutes: 60 + steps: + - name: Checkout Airbyte + uses: actions/checkout@v4 + - name: Java Setup + uses: actions/setup-java@v3 + with: + distribution: "zulu" + java-version: "21" - name: Run Java CDK Tests uses: burrunan/gradle-cache-action@v3 env: