From df9dfc0d7a2eb210726807558e2be39e2883cd70 Mon Sep 17 00:00:00 2001 From: Catherine Noll Date: Thu, 16 May 2024 15:46:39 +0100 Subject: [PATCH] Regression tests: wire through `--use-local-cdk` option to GHA (#38287) --- .github/workflows/regression_tests.yml | 15 ++++++++++++++- 1 file changed, 14 insertions(+), 1 deletion(-) diff --git a/.github/workflows/regression_tests.yml b/.github/workflows/regression_tests.yml index dc24c5573d0c..5493ab6fde77 100644 --- a/.github/workflows/regression_tests.yml +++ b/.github/workflows/regression_tests.yml @@ -25,6 +25,10 @@ on: required: true streams: description: Streams to include in regression tests + use_local_cdk: + description: Use the local CDK when building the target connector + default: "false" + type: boolean jobs: regression_tests: @@ -73,6 +77,15 @@ jobs: echo "STREAM_PARAMS=--connector_regression_tests.selected-streams=$STREAMS" >> $GITHUB_ENV fi + - name: Setup Local CDK Flag + if: github.event_name == 'workflow_dispatch' + run: | + if ${{ github.event.inputs.use_local_cdk }}; then + echo "USE_LOCAL_CDK_FLAG=--use-local-cdk" >> $GITHUB_ENV + else + echo "USE_LOCAL_CDK_FLAG=" >> $GITHUB_ENV + fi + - name: Run Regression Tests [WORKFLOW DISPATCH] if: github.event_name == 'workflow_dispatch' # TODO: consider using the matrix strategy (https://docs.github.com/en/actions/using-jobs/using-a-matrix-for-your-jobs). See https://github.com/airbytehq/airbyte/pull/37659#discussion_r1583380234 for details. uses: ./.github/actions/run-airbyte-ci @@ -89,4 +102,4 @@ jobs: github_token: ${{ secrets.GH_PAT_MAINTENANCE_OSS }} s3_build_cache_access_key_id: ${{ secrets.SELF_RUNNER_AWS_ACCESS_KEY_ID }} s3_build_cache_secret_key: ${{ secrets.SELF_RUNNER_AWS_SECRET_ACCESS_KEY }} - subcommand: connectors --name ${{ github.event.inputs.connector_name }} test --only-step connector_regression_tests --connector_regression_tests.connection-id=${{ github.event.inputs.connection_id }} --connector_regression_tests.pr-url=${{ github.event.inputs.pr_url }} ${{ env.STREAM_PARAMS }} + subcommand: connectors ${{ env.USE_LOCAL_CDK_FLAG }} --name ${{ github.event.inputs.connector_name }} test --only-step connector_regression_tests --connector_regression_tests.connection-id=${{ github.event.inputs.connection_id }} --connector_regression_tests.pr-url=${{ github.event.inputs.pr_url }} ${{ env.STREAM_PARAMS }}