Skip to content

Commit 0f8ffe3

Browse files
authored
Add Stream option to regression test GHA (#38129)
1 parent 9b0db78 commit 0f8ffe3

File tree

1 file changed

+16
-4
lines changed

1 file changed

+16
-4
lines changed

.github/workflows/regression_tests.yml

+16-4
Original file line numberDiff line numberDiff line change
@@ -15,14 +15,16 @@ on:
1515
workflow_dispatch:
1616
inputs:
1717
connector_name:
18-
description: "Connector name (e.g. source-faker)"
18+
description: Connector name (e.g. source-faker)
1919
required: true
2020
connection_id:
21-
description: "ID of the connection to test"
21+
description: ID of the connection to test; use "auto" to let the connection retriever choose a connection
2222
required: true
2323
pr_url:
24-
description: "URL of the PR containing the code change"
24+
description: URL of the PR containing the code change
2525
required: true
26+
streams:
27+
description: Streams to include in regression tests
2628

2729
jobs:
2830
regression_tests:
@@ -61,6 +63,16 @@ jobs:
6163
id: fetch_last_commit_id_wd
6264
run: echo "commit_id=$(git rev-parse origin/${{ steps.extract_branch.outputs.branch }})" >> $GITHUB_OUTPUT
6365

66+
- name: Setup Stream Parameters
67+
if: github.event_name == 'workflow_dispatch'
68+
run: |
69+
if [ -z "${{ github.event.inputs.streams }}" ]; then
70+
echo "STREAM_PARAMS=" >> $GITHUB_ENV
71+
else
72+
STREAMS=$(echo "${{ github.event.inputs.streams }}" | sed 's/,/ --connector_regression_tests.selected-streams=/g')
73+
echo "STREAM_PARAMS=--connector_regression_tests.selected-streams=$STREAMS" >> $GITHUB_ENV
74+
fi
75+
6476
- name: Run Regression Tests [WORKFLOW DISPATCH]
6577
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.
6678
uses: ./.github/actions/run-airbyte-ci
@@ -77,4 +89,4 @@ jobs:
7789
github_token: ${{ secrets.GH_PAT_MAINTENANCE_OSS }}
7890
s3_build_cache_access_key_id: ${{ secrets.SELF_RUNNER_AWS_ACCESS_KEY_ID }}
7991
s3_build_cache_secret_key: ${{ secrets.SELF_RUNNER_AWS_SECRET_ACCESS_KEY }}
80-
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 }}"
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 }}

0 commit comments

Comments
 (0)