Skip to content

Commit

Permalink
Browse files Browse the repository at this point in the history
This is to allow all future PRs to be tested on the travis CI
service for the convenience of the project maintainers.
This ensures that PRs does not  break any of the existing
features.

The build file will instruct travis to write a log message before
running any test. This is to give developers and maintainers
looking at the log an ease of mind that the tests are
indeed being run. This is because the log will look very empty
and suspicious even if the build passed if this feature is not
implemented.
  • Loading branch information
MightyCupcakes authored and damithc committed Jan 30, 2017
1 parent e625296 commit bf647c1
Show file tree
Hide file tree
Showing 4 changed files with 57 additions and 0 deletions.
5 changes: 5 additions & 0 deletions .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -17,3 +17,8 @@ test/data/
/bin/
/data/
publish.sh

# Gradle build files
.gradle/
build/

10 changes: 10 additions & 0 deletions .travis.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,10 @@
language: java
matrix:
include:
- jdk: oraclejdk8


addons:
apt:
packages:
- oracle-java8-installer
1 change: 1 addition & 0 deletions README.md
Original file line number Diff line number Diff line change
@@ -1,3 +1,4 @@
[![Build Status](https://travis-ci.org/se-edu/addressbook-level3.svg?branch=master)](https://travis-ci.org/se-edu/addressbook-level3)
[![Codacy Badge](https://api.codacy.com/project/badge/Grade/d4a0954383444a8db8cb26e5f5b7302c)](https://www.codacy.com/app/se-edu/addressbook-level3?utm_source=github.com&utm_medium=referral&utm_content=se-edu/addressbook-level3&utm_campaign=Badge_Grade)

# AddressBook (Level 3)
Expand Down
41 changes: 41 additions & 0 deletions build.gradle
Original file line number Diff line number Diff line change
@@ -0,0 +1,41 @@
apply plugin: 'java'

repositories {
mavenCentral()
}

sourceSets {
main {
java {
srcDirs = ['src']
}
}
test {
java {
srcDirs = ['test/java']
}
}
}

dependencies {
testCompile 'junit:junit:4.12'
}

test {
/*
* Prints the currently running test's name in the CI's build log,
* so that we can check if tests are being silently skipped or stalling the build.
*/
if (System.env.'CI') {
beforeTest { descriptor ->
logger.lifecycle('Running test: ' + descriptor)
}
}
}

compileJava {
sourceCompatibility = 1.8
targetCompatibility = 1.8
}

defaultTasks 'clean', 'test'

0 comments on commit bf647c1

Please sign in to comment.