Skip to content
This repository was archived by the owner on Dec 19, 2023. It is now read-only.

Commit ac9ea12

Browse files
ci: update github workflow to include Gradle test run
1 parent 0ab682c commit ac9ea12

File tree

3 files changed

+50
-10
lines changed

3 files changed

+50
-10
lines changed

.github/workflows/ci.yml

Lines changed: 36 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,36 @@
1+
name: CI
2+
on: [push, pull_request]
3+
4+
jobs:
5+
validation:
6+
name: Gradle Wrapper Validation
7+
runs-on: ubuntu-latest
8+
steps:
9+
- uses: actions/checkout@v2
10+
- uses: gradle/wrapper-validation-action@v1
11+
test:
12+
name: Test run
13+
strategy:
14+
fail-fast: false
15+
matrix:
16+
os: [ubuntu-latest, macos-latest, windows-latest]
17+
java: [8, 11, 14]
18+
needs: validation
19+
runs-on: ${{ matrix.os }}
20+
steps:
21+
- name: Checkout
22+
uses: actions/checkout@v2
23+
- name: Setup Java
24+
uses: actions/setup-java@v1
25+
with:
26+
java-version: ${{ matrix.java }}
27+
- name: Make gradlew executable (non-Windows only)
28+
if: matrix.os != 'windows-latest'
29+
run: chmod +x ./gradlew
30+
- name: Gradle Check (non-Windows)
31+
if: matrix.os != 'windows-latest'
32+
run: ./gradlew --info check
33+
- name: Gradle Check (Windows)
34+
if: matrix.os == 'windows-latest'
35+
shell: cmd
36+
run: gradlew --info check

.github/workflows/gradle-wrapper-validation.yml

Lines changed: 0 additions & 10 deletions
This file was deleted.

build.gradle

Lines changed: 14 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -17,6 +17,9 @@
1717
* FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
1818
*/
1919

20+
import org.gradle.api.tasks.testing.logging.TestExceptionFormat
21+
import org.gradle.api.tasks.testing.logging.TestLogEvent
22+
2023
plugins {
2124
id "com.jfrog.bintray" version "$LIB_BINTRAY_PLUGIN_VER" apply false
2225
id 'net.researchgate.release' version "$LIB_RELEASE_PLUGIN_VER"
@@ -60,6 +63,17 @@ subprojects {
6063

6164
test {
6265
useJUnitPlatform()
66+
testLogging {
67+
events TestLogEvent.FAILED,
68+
TestLogEvent.PASSED,
69+
TestLogEvent.SKIPPED,
70+
TestLogEvent.STANDARD_ERROR,
71+
TestLogEvent.STANDARD_OUT
72+
exceptionFormat TestExceptionFormat.FULL
73+
showCauses true
74+
showExceptions true
75+
showStackTraces true
76+
}
6377
}
6478

6579
idea {

0 commit comments

Comments
 (0)