Skip to content

Commit f015210

Browse files
committed
Add simple gradle workflow
1 parent 3fe20e3 commit f015210

File tree

3 files changed

+56
-2
lines changed

3 files changed

+56
-2
lines changed

.github/workflows/gradle.yml

+38
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,38 @@
1+
name: Java gradle CI
2+
3+
on:
4+
push:
5+
branches:
6+
- Development
7+
8+
jobs:
9+
test:
10+
name: Test algorithms
11+
strategy:
12+
matrix:
13+
os: [ubuntu-latest, macos-latest, windows-latest]
14+
java-version: [1.8, 11]
15+
runs-on: ${{ matrix.os }}
16+
17+
steps:
18+
- name: Checkout project
19+
uses: actions/checkout@v2
20+
with:
21+
ref: Development
22+
- name: Set up jdk
23+
uses: actions/setup-java@v1
24+
with:
25+
java-version: ${{ matrix.java-version }}
26+
- name: JUnit5 tests on ubuntu
27+
if: startsWith(matrix.os, 'ubuntu')
28+
run: |
29+
chmod +x gradlew
30+
./gradlew clean test
31+
- name: JUnit5 tests on macos
32+
if: startsWith(matrix.os, 'macos')
33+
run: |
34+
chmod +x gradlew
35+
./gradlew clean test
36+
- name: JUnit5 tests on windows
37+
if: startsWith(matrix.os, 'windows')
38+
run: gradle clean test

.gitignore

+8
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,15 @@
1+
.settings
2+
3+
.classpath
4+
.project
5+
16
Java.iml
27
.idea/*
38
out/
49
*.iml
10+
511
.gradle
12+
13+
bin
614
target
715
build

build.gradle

+10-2
Original file line numberDiff line numberDiff line change
@@ -10,10 +10,18 @@ repositories {
1010
}
1111

1212
dependencies {
13-
testCompile 'org.junit.jupiter:junit-jupiter-api:5.5.0'
13+
testImplementation('org.junit.jupiter:junit-jupiter-api:5.5.0')
14+
testRuntime('org.junit.jupiter:junit-jupiter-engine:5.5.0')
15+
}
16+
17+
test {
18+
useJUnitPlatform()
19+
testLogging {
20+
events "passed", "skipped", "failed", "standardOut", "standardError"
21+
}
1422
}
1523

1624
group = 'algorithm'
1725
version = '1.0-SNAPSHOT'
1826
description = 'java-algorithm'
19-
sourceCompatibility = '1.8'
27+
sourceCompatibility = '1.8'

0 commit comments

Comments
 (0)