Skip to content

Commit df9dfc0

Browse files
authored
Regression tests: wire through --use-local-cdk option to GHA (#38287)
1 parent b82e1ed commit df9dfc0

File tree

1 file changed

+14
-1
lines changed

1 file changed

+14
-1
lines changed

.github/workflows/regression_tests.yml

+14-1
Original file line numberDiff line numberDiff line change
@@ -25,6 +25,10 @@ on:
2525
required: true
2626
streams:
2727
description: Streams to include in regression tests
28+
use_local_cdk:
29+
description: Use the local CDK when building the target connector
30+
default: "false"
31+
type: boolean
2832

2933
jobs:
3034
regression_tests:
@@ -73,6 +77,15 @@ jobs:
7377
echo "STREAM_PARAMS=--connector_regression_tests.selected-streams=$STREAMS" >> $GITHUB_ENV
7478
fi
7579
80+
- name: Setup Local CDK Flag
81+
if: github.event_name == 'workflow_dispatch'
82+
run: |
83+
if ${{ github.event.inputs.use_local_cdk }}; then
84+
echo "USE_LOCAL_CDK_FLAG=--use-local-cdk" >> $GITHUB_ENV
85+
else
86+
echo "USE_LOCAL_CDK_FLAG=" >> $GITHUB_ENV
87+
fi
88+
7689
- name: Run Regression Tests [WORKFLOW DISPATCH]
7790
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.
7891
uses: ./.github/actions/run-airbyte-ci
@@ -89,4 +102,4 @@ jobs:
89102
github_token: ${{ secrets.GH_PAT_MAINTENANCE_OSS }}
90103
s3_build_cache_access_key_id: ${{ secrets.SELF_RUNNER_AWS_ACCESS_KEY_ID }}
91104
s3_build_cache_secret_key: ${{ secrets.SELF_RUNNER_AWS_SECRET_ACCESS_KEY }}
92-
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 }}
105+
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 }}

0 commit comments

Comments
 (0)