Skip to content

Add simple gradle workflow for Development #1199

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Merged
merged 1 commit into from
Jan 12, 2020
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
38 changes: 38 additions & 0 deletions .github/workflows/gradle.yml
Original file line number Diff line number Diff line change
@@ -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 changes: 8 additions & 0 deletions .gitignore
Original file line number Diff line number Diff line change
@@ -1,7 +1,15 @@
.settings

.classpath
.project

Java.iml
.idea/*
out/
*.iml

.gradle

bin
target
build
12 changes: 10 additions & 2 deletions build.gradle
Original file line number Diff line number Diff line change
Expand Up @@ -10,10 +10,18 @@ repositories {
}

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'
version = '1.0-SNAPSHOT'
description = 'java-algorithm'
sourceCompatibility = '1.8'
sourceCompatibility = '1.8'