@@ -74,33 +74,28 @@ jobs:
74
74
# - name: Enable Step Debugging
75
75
# run: echo "ACTIONS_STEP_DEBUG=true >> $GITHUB_ENV"
76
76
77
- # Checkout current branch of gen3-code-vigil if it is the repo under test
78
- - name : Checkout integration test code from dev branch
79
- if : ${{ github.event.repository.name == 'gen3-code-vigil' }}
80
- uses : actions/checkout@v4
81
-
82
- # Checkout master branch of gen3-code-vigil when another repo is under test
83
- - name : Checkout integration test code from master branch
84
- if : ${{ github.event.repository.name != 'gen3-code-vigil' }}
85
- uses : actions/checkout@v4
86
- with :
87
- repository : uc-cdis/gen3-code-vigil
88
- ref : master
89
-
90
77
# Skip integration tests when the following PR labels are present:
91
78
# not-ready-for-ci / decommission-environment
92
79
- name : Skip integration tests for specific PR labels
80
+ working-directory : ${{ github.workspace }}
93
81
run : |
94
82
if gh api repos/$REPO_FN/pulls/$PR_NUM --jq '.labels | map(.name) | .[] | select(. == "not-ready-for-ci" or . == "decommission-environment")' | grep -q .; then
95
83
echo "Skipping CI since one of the PR labels is present - not-ready-for-ci / decommission-environment"
96
84
echo "SKIP_TESTS=true" >> $GITHUB_ENV
97
85
fi
98
86
87
+ # Checkout current repo
88
+ - name : Checkout current repo
89
+ if : ${{ env.SKIP_TESTS != 'true' }}
90
+ uses : actions/checkout@v4
91
+
99
92
# Skip tests when there are only markdown files
100
93
- name : Skip integration tests if PR contains only Markdown files
94
+ if : ${{ env.SKIP_TESTS != 'true' }}
95
+ working-directory : ${{ github.workspace }}
101
96
run : |
102
97
git fetch -q
103
- FILE_TYPES=$(git show --name-only ${{ env.COMMIT_SHA }} | awk -F . '{print $NF}' | sort -u)
98
+ FILE_TYPES=$(git show --name-only ${{ env.COMMIT_SHA }} | grep -o '\S\+\.\S\+' | grep -v '@' | awk -F . '{print $NF}' | sort -u)
104
99
echo $FILE_TYPES
105
100
106
101
# Check if the only file type is markdown
@@ -109,6 +104,14 @@ jobs:
109
104
echo "SKIP_TESTS=true" >> $GITHUB_ENV
110
105
fi
111
106
107
+ # Checkout master branch of gen3-code-vigil when another repo is under test
108
+ - name : Checkout integration test code
109
+ if : ${{ env.SKIP_TESTS != 'true' && github.event.repository.name != 'gen3-code-vigil' }}
110
+ uses : actions/checkout@v4
111
+ with :
112
+ repository : uc-cdis/gen3-code-vigil
113
+ ref : master
114
+
112
115
# gen3-integration-tests run with python 3.9
113
116
- name : Set up Python
114
117
if : ${{ env.SKIP_TESTS != 'true' }}
0 commit comments