Skip to content

Commit 1014f8d

Browse files
author
Alvaro Muñoz
authored
Merge pull request #74 from GitHubSecurityLab/executetests
Test execution should target directory.
2 parents 63e93b9 + dd7345c commit 1014f8d

File tree

1 file changed

+2
-1
lines changed

1 file changed

+2
-1
lines changed

.github/scripts/pr-tests.sh

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -28,7 +28,8 @@ for file in $(gh pr view "$PR_NUMBER" --json files --jq '.files.[].path'); do
2828
elif [[ "$file" == $LANGUAGE/**.ql ]] || [[ "$file" == $LANGUAGE/**.qll ]] ; then
2929
echo "[+] Query $file changed (in $LANGUAGE)"
3030

31-
SRC_DIR=$(realpath --relative-to="./${LANGUAGE}/src" "$file")
31+
SRC_FILE=$(realpath --relative-to="./${LANGUAGE}/src" "$file")
32+
SRC_DIR=$(dirname "$SRC_FILE")
3233
TEST_DIR=./${LANGUAGE}/test/${SRC_DIR}
3334

3435
if [[ -d "$TEST_DIR" ]]; then

0 commit comments

Comments
 (0)