From 309dbcde31c48fde6d90b7327b117df92258d144 Mon Sep 17 00:00:00 2001 From: Hara Prasad Juvvala Date: Thu, 7 Nov 2024 13:46:49 -0600 Subject: [PATCH] fix --- .../workflows/shared_integration_tests.yaml | 20 +++++++++---------- 1 file changed, 10 insertions(+), 10 deletions(-) diff --git a/.github/workflows/shared_integration_tests.yaml b/.github/workflows/shared_integration_tests.yaml index 78535b60..0cb87332 100644 --- a/.github/workflows/shared_integration_tests.yaml +++ b/.github/workflows/shared_integration_tests.yaml @@ -74,6 +74,15 @@ jobs: # - name: Enable Step Debugging # run: echo "ACTIONS_STEP_DEBUG=true >> $GITHUB_ENV" + # Skip integration tests when the following PR labels are present: + # not-ready-for-ci / decommission-environment + - name: Skip integration tests for specific PR labels + run: | + if gh api repos/$REPO_FN/pulls/$PR_NUM --jq '.labels | map(.name) | .[] | select(. == "not-ready-for-ci" or . == "decommission-environment")' | grep -q .; then + echo "Skipping CI since one of the PR labels is present - not-ready-for-ci / decommission-environment" + echo "SKIP_TESTS=true" >> $GITHUB_ENV + fi + # Checkout current repo - name: Checkout current repo uses: actions/checkout@v4 @@ -83,7 +92,7 @@ jobs: working-directory: ${{ github.workspace }} run: | git fetch -q - FILE_TYPES=$(git show --name-only ${{ env.COMMIT_SHA }} | awk -F . '{print $NF}' | sort -u) + FILE_TYPES=$(git show --name-only ${{ env.COMMIT_SHA }} | grep -o '\S\+\.\S\+' | grep -v '@' | awk -F . '{print $NF}' | sort -u) echo $FILE_TYPES # Check if the only file type is markdown @@ -101,15 +110,6 @@ jobs: path: gen3-code-vigil ref: master - # Skip integration tests when the following PR labels are present: - # not-ready-for-ci / decommission-environment - - name: Skip integration tests for specific PR labels - run: | - if gh api repos/$REPO_FN/pulls/$PR_NUM --jq '.labels | map(.name) | .[] | select(. == "not-ready-for-ci" or . == "decommission-environment")' | grep -q .; then - echo "Skipping CI since one of the PR labels is present - not-ready-for-ci / decommission-environment" - echo "SKIP_TESTS=true" >> $GITHUB_ENV - fi - # gen3-integration-tests run with python 3.9 - name: Set up Python if: ${{ env.SKIP_TESTS != 'true' }}