forked from nus-cs2103-AY1718S1/addressbook-level3-old
-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
[nus-cs2103-AY1718S1#45] Set up Travis CI (nus-cs2103-AY1718S1#64)
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
1 parent
e625296
commit bf647c1
Showing
4 changed files
with
57 additions
and
0 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -17,3 +17,8 @@ test/data/ | |
/bin/ | ||
/data/ | ||
publish.sh | ||
|
||
# Gradle build files | ||
.gradle/ | ||
build/ | ||
|
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
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 |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
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' |