Merge pull request #1199 from myronrotter/Development

Add simple gradle workflow for Development
This commit is contained in:
Yang Libin 2020-01-12 09:42:45 +08:00 committed by GitHub
commit 8b416b1267
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
3 changed files with 56 additions and 2 deletions

38
.github/workflows/gradle.yml vendored Normal file
View File

@ -0,0 +1,38 @@
name: Java gradle CI
on:
push:
branches:
- Development
jobs:
test:
name: Test algorithms
strategy:
matrix:
os: [ubuntu-latest, macos-latest, windows-latest]
java-version: [1.8, 11]
runs-on: ${{ matrix.os }}
steps:
- name: Checkout project
uses: actions/checkout@v2
with:
ref: Development
- name: Set up jdk
uses: actions/setup-java@v1
with:
java-version: ${{ matrix.java-version }}
- name: JUnit5 tests on ubuntu
if: startsWith(matrix.os, 'ubuntu')
run: |
chmod +x gradlew
./gradlew clean test
- name: JUnit5 tests on macos
if: startsWith(matrix.os, 'macos')
run: |
chmod +x gradlew
./gradlew clean test
- name: JUnit5 tests on windows
if: startsWith(matrix.os, 'windows')
run: gradle clean test

8
.gitignore vendored
View File

@ -1,7 +1,15 @@
.settings
.classpath
.project
Java.iml Java.iml
.idea/* .idea/*
out/ out/
*.iml *.iml
.gradle .gradle
bin
target target
build build

View File

@ -10,7 +10,15 @@ repositories {
} }
dependencies { dependencies {
testCompile 'org.junit.jupiter:junit-jupiter-api:5.5.0' testImplementation('org.junit.jupiter:junit-jupiter-api:5.5.0')
testRuntime('org.junit.jupiter:junit-jupiter-engine:5.5.0')
}
test {
useJUnitPlatform()
testLogging {
events "passed", "skipped", "failed", "standardOut", "standardError"
}
} }
group = 'algorithm' group = 'algorithm'