From cf86dedd3df8efbd8f16166cca83e216015facb1 Mon Sep 17 00:00:00 2001 From: "Aaron (\"AJ\") Steers" Date: Mon, 2 Dec 2024 11:41:23 -0800 Subject: [PATCH] ci: skip downstream connector tests if no source code is changed (#101) --- .github/workflows/connector-tests.yml | 8 ++++++-- 1 file changed, 6 insertions(+), 2 deletions(-) diff --git a/.github/workflows/connector-tests.yml b/.github/workflows/connector-tests.yml index fb25bc72d..b2b056026 100644 --- a/.github/workflows/connector-tests.yml +++ b/.github/workflows/connector-tests.yml @@ -94,9 +94,13 @@ jobs: steps: - name: Abort if extra not changed (${{matrix.cdk_extra}}) id: no_changes - if: ${{ matrix.cdk_extra != 'n/a' && needs.cdk_changes.outputs[matrix.cdk_extra] == 'false' }} + if: ${{ needs.cdk_changes.outputs['src'] == 'false' || matrix.cdk_extra != 'n/a' && needs.cdk_changes.outputs[matrix.cdk_extra] == 'false' }} run: | - echo "Aborting job as specified extra not changed: ${{matrix.cdk_extra}} = ${{ needs.cdk_changes.outputs[matrix.cdk_extra] }}" + echo "Aborting job." + echo "Source code changed: ${{ needs.cdk_changes.outputs['src'] }}" + if [ "${{ matrix.cdk_extra }}" != "n/a" ]; then + echo "Extra not changed: ${{ matrix.cdk_extra }} = ${{ needs.cdk_changes.outputs[matrix.cdk_extra] }}" + fi echo "> Skipped '${{matrix.connector}}' (no relevant changes)" >> $GITHUB_STEP_SUMMARY echo "status=cancelled" >> $GITHUB_OUTPUT exit 0