From e70f42b248462874a125832fe97a4b2fa48e222c Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?=C3=93lafur=20P=C3=A1ll=20Geirsson?= Date: Mon, 24 Oct 2016 14:54:56 +0200 Subject: [PATCH] Setup caching on drone --- .drone.yml | 7 +++++- bin/nailgun_integration_test.sh | 41 --------------------------------- bin/setupCI.sh | 1 - bin/testAll.sh | 7 +++--- 4 files changed, 9 insertions(+), 47 deletions(-) delete mode 100755 bin/nailgun_integration_test.sh diff --git a/.drone.yml b/.drone.yml index d85d53fda..58de4722f 100644 --- a/.drone.yml +++ b/.drone.yml @@ -1,6 +1,11 @@ -# Trigger build 8 build: image: olafurpg/scalafix:0.0.1 + environment: + - COURSIER_CACHE=/drone/cache/coursier commands: + - export PATH=$PATH:/root/local/bin - ./bin/setupCI.sh - ./bin/testAll.sh +cache: + mount: + - /drone/cache 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 index 215b1b281..ba2c262ea 100755 --- a/bin/setupCI.sh +++ b/bin/setupCI.sh @@ -2,5 +2,4 @@ set -e apt-get install nailgun alias ng=ng-nailgun -export PATH=$PATH:/root/local/bin pip install --user codecov diff --git a/bin/testAll.sh b/bin/testAll.sh index b27397d6c..a47a24977 100755 --- a/bin/testAll.sh +++ b/bin/testAll.sh @@ -1,7 +1,6 @@ #!/bin/bash set -e -sbt clean coverage test -sbt "; publishLocal ; scripted ; cli/pack" -sbt coverageAggregate - +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