diff --git a/.drone.yml b/.drone.yml index b63de1676..58de4722f 100644 --- a/.drone.yml +++ b/.drone.yml @@ -1,12 +1,11 @@ -# Trigger build 8 build: image: olafurpg/scalafix:0.0.1 + environment: + - COURSIER_CACHE=/drone/cache/coursier commands: - - apt-get install nailgun - - alias ng=ng-nailgun - export PATH=$PATH:/root/local/bin - - pip install --user codecov + - ./bin/setupCI.sh - ./bin/testAll.sh - # I can't be bothered to hide this token. - - $HOME/.local/bin/codecov -t 5f2117aa-0a01-4cf1-8bf7-631a62ccb47a - +cache: + mount: + - /drone/cache diff --git a/.travis.yml b/.travis.yml index dbf091b5b..dfd18db08 100644 --- a/.travis.yml +++ b/.travis.yml @@ -1,7 +1,5 @@ language: scala -# Use container-based infrastructure sudo: false -# These directories are cached to S3 at the end of the build cache: directories: - $HOME/.ivy2/cache @@ -11,13 +9,12 @@ git: scala: - 2.11.8 before_install: - - pip install --user codecov + - ./bin/setupCI.sh script: - ./bin/testAll.sh after_success: - codecov jdk: - - oraclejdk8 - oraclejdk7 notifications: email: diff --git a/bin/nailgun_integration_test.sh b/bin/nailgun_integration_test.sh deleted file mode 100755 index 5dcedc20f..000000000 --- a/bin/nailgun_integration_test.sh +++ /dev/null @@ -1,41 +0,0 @@ -#!/usr/bin/env bash -set -e - -echo "Running nailgun integration test..." - -cwd=$(pwd) -cd cli/target/pack -make install -cd $cwd - -echoOriginalContents() { - cat << EOF -object app { - def main() { - println(1) - } -} -EOF -} - -echoExpectedContents() { - cat << EOF -object app { - def main(): Unit = { - println(1) - } -} -EOF -} -original=target/original.scala -expected=target/expected.scala - -mkdir -p target -echoOriginalContents > ${original} -echoExpectedContents > ${expected} -./bin/scalafix_ng -i ${original} - -# Assert there is no diff -diff ${original} ${expected} - -echo "Done!" diff --git a/bin/setupCI.sh b/bin/setupCI.sh new file mode 100755 index 000000000..ba2c262ea --- /dev/null +++ b/bin/setupCI.sh @@ -0,0 +1,5 @@ +#!/usr/bin/env bash +set -e +apt-get install nailgun +alias ng=ng-nailgun +pip install --user codecov diff --git a/bin/testAll.sh b/bin/testAll.sh index d949764c3..a47a24977 100755 --- a/bin/testAll.sh +++ b/bin/testAll.sh @@ -1,10 +1,6 @@ #!/bin/bash set -e -sbt clean coverage test -sbt "; publishLocal ; scripted ; cli/pack" -sbt coverageAggregate - -# Integration tests -./bin/nailgun_integration_test.sh - +sbt -Dsbt.home.ivy=/drone/cache/ivy2 clean coverage test +sbt -Dsbt.home.ivy=/drone/cache/ivy2 "; publishLocal ; scripted ; cli/pack" +sbt -Dsbt.home.ivy=/drone/cache/ivy2 coverageAggregate diff --git a/cli/src/main/scala/scalafix/cli/Cli.scala b/cli/src/main/scala/scalafix/cli/Cli.scala index 899994971..3b06d449a 100644 --- a/cli/src/main/scala/scalafix/cli/Cli.scala +++ b/cli/src/main/scala/scalafix/cli/Cli.scala @@ -48,8 +48,7 @@ case class ScalafixOptions( ) debug: Boolean = false, @Recurse common: CommonOptions = CommonOptions() ) extends App { - - Cli.runOn(this) + Cli.runOn(this.copy(files = files ++ remainingArgs)) } object Cli extends AppOf[ScalafixOptions] { diff --git a/readme/Intro.scalatex b/readme/Intro.scalatex index 0af917dff..eae3d14fb 100644 --- a/readme/Intro.scalatex +++ b/readme/Intro.scalatex @@ -3,8 +3,7 @@ @p @raw - codecov.io - Build Status + Join the chat at https://gitter.im/scalacenter/scalafix @p