Skip to content

Commit

Permalink
fix: launch checkstyle in a dedicated node of travis and skip it when… (
Browse files Browse the repository at this point in the history
STAMP-project#549)

* fix: launch checkstyle in a dedicated node of travis and skip it when deploy

* fix: checkstyle in CloverCoverageSelector
  • Loading branch information
danglotb authored Sep 14, 2018
1 parent 426f40c commit 118bc4f
Show file tree
Hide file tree
Showing 4 changed files with 9 additions and 15 deletions.
11 changes: 2 additions & 9 deletions .travis.yml
Original file line number Diff line number Diff line change
Expand Up @@ -14,6 +14,7 @@ env:
- SCRIPT=travis-coverage.sh
- SCRIPT=travis-jar.sh
- SCRIPT=travis-dspot-maven.sh
- SCRIPT=travis-checkstyle.sh

cache:
directories:
Expand All @@ -35,12 +36,4 @@ after_success:

branch:
only:
- master

notifications:
webhooks:
urls:
- "https://scalar.vector.im/api/neb/services/hooks/dHJhdmlzLWNpLyU0MGJkYW5nbG90JTNBbWF0cml4Lm9yZy8lMjF2bkN5V2FHSmJ4RVNBa3p5cWglM0FtYXRyaXgub3Jn"
on_success: change # always|never|change
on_failure: always
on_start: never
- master
3 changes: 3 additions & 0 deletions .travis/travis-checkstyle.sh
Original file line number Diff line number Diff line change
@@ -0,0 +1,3 @@
#!/usr/bin/env bash

mvn checkstyle:checkstyle
2 changes: 1 addition & 1 deletion .travis/travis-deploy.sh
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
#!/usr/bin/env bash

if [ "$TRAVIS_PULL_REQUEST" = "false" ] && [ "$TRAVIS_BRANCH" = "master" ]; then
cp .travis/travis-settings.xml $HOME/.m2/settings.xml && mvn deploy -DskipTests
cp .travis/travis-settings.xml $HOME/.m2/settings.xml && mvn deploy -DskipTests -Dcheckstyle.skip
else
echo "Nothing to deploy when on PR or other branch"
fi
Original file line number Diff line number Diff line change
Expand Up @@ -192,14 +192,12 @@ private Coverage computeAmplifiedCoverage() {
}

private final static String PATH_TO_COPIED_FILES = "target/dspot/copy/";


private String getPathToCopiedFiles() {
return DSpotUtils.shouldAddSeparator.apply(this.configuration.getAbsolutePathToProjectRoot())
+ PATH_TO_COPIED_FILES;
return this.configuration.getAbsolutePathToProjectRoot() + PATH_TO_COPIED_FILES;
}
private void initDirectory() {

private void initDirectory() {
// in order to run clover easily, we have to put all the sources and
// test classes in the same folder.
// also, we will print amplified test in the same folder
Expand Down

0 comments on commit 118bc4f

Please sign in to comment.