-
Notifications
You must be signed in to change notification settings - Fork 82
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
1 parent
57532c4
commit aac1ed4
Showing
1 changed file
with
35 additions
and
5 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -29,9 +29,19 @@ jobs: | |
- name: Build with Gradle | ||
run: ./gradlew build -x test | ||
|
||
- name: Run JUnit Tests on Linux | ||
- name: Run JUnit Tests | ||
run: | | ||
./gradlew test | ||
test_output=$(./gradlew test --quiet | grep -E "tests? passed|tests? failed") | ||
echo "$test_output" | ||
tests_run=$(echo "$test_output" | grep -Eo "[0-9]+" | head -n 1) | ||
tests_passed=$(echo "$test_output" | grep -Eo "[0-9]+" | tail -n 1) | ||
tests_failed=$((tests_run - tests_passed)) | ||
echo "Tests Run: $tests_run" | ||
echo "Tests Passed: $tests_passed" | ||
echo "Tests Failed: $tests_failed" | ||
if [[ $tests_failed -gt 0 ]]; then | ||
exit 1 | ||
fi | ||
test-macos: | ||
runs-on: macos-latest | ||
|
@@ -53,7 +63,17 @@ jobs: | |
|
||
- name: Run JUnit Tests on macOS | ||
run: | | ||
./gradlew test | ||
test_output=$(./gradlew test --quiet | grep -E "tests? passed|tests? failed") | ||
echo "$test_output" | ||
tests_run=$(echo "$test_output" | grep -Eo "[0-9]+" | head -n 1) | ||
tests_passed=$(echo "$test_output" | grep -Eo "[0-9]+" | tail -n 1) | ||
tests_failed=$((tests_run - tests_passed)) | ||
echo "Tests Run: $tests_run" | ||
echo "Tests Passed: $tests_passed" | ||
echo "Tests Failed: $tests_failed" | ||
if [[ $tests_failed -gt 0 ]]; then | ||
exit 1 | ||
fi | ||
test-windows: | ||
runs-on: windows-latest | ||
|
@@ -66,8 +86,18 @@ jobs: | |
uses: actions/setup-java@v2 | ||
with: | ||
java-version: 11 | ||
distribution: 'adopt' # Specify the distribution, e.g., 'adopt', '[email protected]', etc. | ||
distribution: 'adopt' | ||
|
||
- name: Run JUnit Tests on Windows | ||
run: | | ||
.\gradlew.bat test | ||
test_output=$(./gradlew.bat test --quiet | grep -E "tests? passed|tests? failed") | ||
echo "$test_output" | ||
tests_run=$(echo "$test_output" | grep -Eo "[0-9]+" | head -n 1) | ||
tests_passed=$(echo "$test_output" | grep -Eo "[0-9]+" | tail -n 1) | ||
tests_failed=$((tests_run - tests_passed)) | ||
echo "Tests Run: $tests_run" | ||
echo "Tests Passed: $tests_passed" | ||
echo "Tests Failed: $tests_failed" | ||
if [[ $tests_failed -gt 0 ]]; then | ||
exit 1 | ||
fi |