File tree Expand file tree Collapse file tree 2 files changed +9
-2
lines changed Expand file tree Collapse file tree 2 files changed +9
-2
lines changed Original file line number Diff line number Diff line change 5555 if : failure()
5656
5757 test-changed :
58- name : Test changed exercises using java-test-runner
58+ name : Test changed exercises using gradlew
5959 if : github.event_name == 'pull_request'
6060 runs-on : ubuntu-24.04
6161 steps :
Original file line number Diff line number Diff line change @@ -13,9 +13,16 @@ MERGE_BASE=$(git merge-base HEAD origin/"$BASE_BRANCH")
1313# Get changed files relative to merge base
1414changed_files=$( git diff --name-only " $MERGE_BASE " HEAD)
1515
16+ # If any Gradle build file changed, run the full suite and exit
17+ if echo " $changed_files " | grep -qE ' \.(gradle|gradlew|bat)$|settings\.gradle' ; then
18+ echo " Gradle build files changed, running full test suite..."
19+ ./bin/test-with-test-runner
20+ exit 0
21+ fi
22+
1623# Extract unique exercise directories
1724changed_exercises=$( echo " $changed_files " | \
18- grep -E ' ^exercises/(practice|concept)/[^/]+/.+\.( java|gradle) $' | \
25+ grep -E ' ^exercises/(practice|concept)/[^/]+/.+\.java$' | \
1926 cut -d/ -f1-3 | sort -u)
2027
2128if [ -z " $changed_exercises " ]; then
You can’t perform that action at this time.
0 commit comments