WIP DO NOT MERGE: Require regression tests for API source connectors #7542
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
name: Connectors Approve Regression Tests | |
concurrency: | |
# This is the name of the concurrency group. It is used to prevent concurrent runs of the same workflow. | |
# | |
# - github.head_ref is only defined on PR runs, it makes sure that the concurrency group is unique for pull requests | |
# ensuring that only one run per pull request is active at a time. | |
# | |
# - github.run_id is defined on all runs, it makes sure that the concurrency group is unique for workflow dispatches. | |
# This allows us to run multiple workflow dispatches in parallel. | |
group: ${{ github.workflow }}-${{ github.head_ref || github.run_id }} | |
cancel-in-progress: true | |
on: | |
pull_request: | |
types: | |
- opened | |
- synchronize | |
paths: | |
- "airbyte-integrations/connectors/**/*" | |
jobs: | |
connectors_approve_regression_tests: | |
name: Connectors Approve Regression Tests | |
runs-on: ubuntu-latest | |
if: github.event.pull_request.head.repo.fork != true | |
timeout-minutes: 2 | |
steps: | |
- name: Read persisted data | |
uses: actions/download-artifact@v4 | |
with: | |
name: regression-test-approval.txt | |
- name: Determine whether tests can be approved | |
run: | | |
if [[ -f "regression-test-approval.txt" ]]; then | |
echo "CAN_APPROVE_TESTS=true >> $GITHUB_ENV | |
else | |
echo "CAN_APPROVE_TESTS= >> $GITHUB_ENV | |
fi | |
- name: Require Regression Test Approval | |
if: env.CAN_APPROVE_TESTS == 'false' | |
run: | | |
echo "Waiting for manual regression test approval" | |
exit 1 | |
- name: Approve Regression Tests | |
if: env.CAN_APPROVE_TESTS == 'true' | |
run: echo "Regression tests manually approved" | |
- name: Write persisted data | |
id: write-persisted-data | |
if: env.CAN_APPROVE_TESTS == 'false' | |
uses: actions/upload-artifact@v4 | |
with: | |
name: regression-test-approval.txt | |
path: regression-test-approval.txt |