Skip to content

Commit

Permalink
Merge pull request #63 from romanowski/fix-tests
Browse files Browse the repository at this point in the history
Fix integration tests
  • Loading branch information
romanowski authored Dec 30, 2017
2 parents 05b9242 + 977c3fc commit 1a228d5
Show file tree
Hide file tree
Showing 6 changed files with 10 additions and 15 deletions.
3 changes: 0 additions & 3 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -2,9 +2,6 @@

[![Build Status](https://api.travis-ci.org/romanowski/hoarder.png?branch=master)](https://travis-ci.org/romanowski/hoarder)
[![Gitter room](https://badges.gitter.im/sbt_hoarder/Lobby.svg)](https://gitter.im/sbt_hoarder/Lobby?utm_source=badge&utm_medium=badge&utm_campaign=pr-badge&utm_content=badge)
[![Current realease](https://maven-badges.herokuapp.com/maven-central/com.github.romanowski/hoarder/badge.png)](https://search.maven.org/#search%7Cga%7C1%7Cg%3A%22com.github.romanowski%22)
[![Master on gitlab](https://gitlab.com/romanowski1/hoarder/badges/master/pipeline.svg)](https://gitlab.com/romanowski1/hoarder/commits/master)


Hoarder is the set of sbt plugins (for sbt 1.0.x and 0.13.x) that allows you to reuse compilation data from other workspaces (aka. _Cached compilation_).

Expand Down
13 changes: 7 additions & 6 deletions build.sbt
Original file line number Diff line number Diff line change
Expand Up @@ -9,7 +9,7 @@ import scala.util.control.NonFatal
lazy val exactVersion = Try("git describe --tags --exact-match".!!.trim).toOption
val shouldReleaseAsSnapshot = exactVersion.isEmpty || !sys.env.contains("TRAVIS_BRANCH")

version.in(Global) := {
version.in(Global) := sys.env.get("HOARDER_CI_VERSION").getOrElse {
try exactVersion match {
case Some(version) =>
if (shouldReleaseAsSnapshot) s"$version-SNAPSHOT" else version
Expand All @@ -28,7 +28,12 @@ version.in(Global) := {

crossSbtVersions := Seq("0.13.16", "1.0.2")


inThisBuild {
resolvers += {
import sbt.Resolver._
url("sbt-release-repo", new URL(s"$TypesafeRepositoryRoot/ivy-releases/"))(ivyStylePatterns)
}
}

def noPublishSettings = Seq(
publishTo := Some(Resolver.file("my-local", file(".") / "repo")(Resolver.defaultIvyPatterns)),
Expand Down Expand Up @@ -64,10 +69,6 @@ def commonSettings(isSbtPlugin: Boolean = true, shouldPublish: Boolean = true) =
version := version.in(Global).value,
sbtPlugin := isSbtPlugin,
scalaVersion := bySbtVersion("2.10.6", "2.12.2").value,
resolvers += {
import sbt.Resolver._
url("sbt-release-repo", new URL(s"$TypesafeRepositoryRoot/ivy-releases/"))(ivyStylePatterns)
}
) ++ publishSettings

val hoarderCore = project.settings(commonSettings(isSbtPlugin = false))
Expand Down
2 changes: 1 addition & 1 deletion ci-scripts/integrationTest.sh
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
#TODO - I need to cross compile this!
set -o xtrace
rm -r -f test-ws
export HOARDER_CI_VERSION="1.0.1-a-test-version"
export HOARDER_CI_VERSION="hoarder-test-version"

sbt '^publishLocal' && \
ls -alR test-ws
Expand Down
3 changes: 0 additions & 3 deletions ci-scripts/quickTest.sh

This file was deleted.

2 changes: 1 addition & 1 deletion ci-scripts/s3-integration.sh
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
set -o xtrace
rm -r -f test-ws
export HOARDER_CI_VERSION="1.0.1-a-test-version"
export HOARDER_CI_VERSION="hoarder-test-version"

sbt ^publishLocal && \
ci-scripts/install-and-clone.sh ensime-server && \
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -30,7 +30,7 @@ object PluginTests extends AutoPlugin {
testIncCompilation, allCompilationKey := Nil) ++
testRecompilationIn(Compile, Test)

private val runTestKey = TaskKey[Unit]("hoarder:test:runTest-TODO-remove??")
private val runTestKey = TaskKey[Unit]("hoarder:test:runTest")
private val testCacheImportKey = TaskKey[Unit]("testCacheImport")
private val allCompilationKey = TaskKey[Seq[CompilationResult]]("test:allIncCompileResult")

Expand Down

0 comments on commit 1a228d5

Please sign in to comment.