-
Notifications
You must be signed in to change notification settings - Fork 0
/
build.sbt
66 lines (55 loc) · 2.46 KB
/
build.sbt
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
import org.scoverage.coveralls.Imports.CoverallsKeys._
import Dependencies._
// Leverage Maven's repository and not look for the local
resolvers in ThisBuild ++= Seq(
"Apache Development Snapshot Repository" at "https://repository.apache.org/content/repositories/snapshots/",
Resolver.sonatypeRepo("snapshots") /* for snapshots only */
)
val commonSettings = Seq(
name := "tube",
organization := "org.nugit",
description := "Data pipeline",
version := "0.1-SNAPSHOT",
scalaVersion := "2.11.11",
scalacOptions ++= Seq("-Yrangepos", "-Ypartial-unification")
)
// mask out the nugit.tube.api.posts.StatefulPostsRetriever, nugit.tracer.*, nugit.routes.* and nugit.tube.*
val codeCoverageSettings = Seq(
coverageExcludedPackages := "nugit\\.tube\\.api\\.posts\\.StatefulPostsRetriever;nugit\\.tracer\\..*;nugit\\.routes\\..*;nugit\\.tube\\.Main",
coverageMinimum := 80,
coverageFailOnMinimum := false
)
val slacks = ProjectRef(uri("git://github.com/raymondtay/slacks.git"), "slacks")
lazy val tube = (project in file(".")).dependsOn(slacks)
.settings(
commonSettings ++ codeCoverageSettings,
libraryDependencies ++= (generalLibs ++ testLibs)
)
enablePlugins(JavaServerAppPackaging)
// All tests are run sequentially
parallelExecution in Test := false
// concurrentRestrictions in Global := Tags.limit(Tags.ForkedTestGroup, 4) :: Nil
//
// import Tests._
// def groupByFirst(tests: Seq[TestDefinition]) =
// tests groupBy (_.name.contains("Sink")) map {
// case (true, tests) ⇒
// val options = ForkOptions().withRunJVMOptions(Vector("-D-J-Xmx3072m"))
// new Group("FlinkTests", tests, SubProcess(options))
// case (false, tests) ⇒
// val options = ForkOptions().withRunJVMOptions(Vector("-D-J-Xmx1536m"))
// new Group("NonFlinkTests", tests, SubProcess(options))
// } toSeq
//
// testGrouping in Test := groupByFirst( (definedTests in Test).value )
//
// testForkedParallel in Test := true
// make run command include the provided dependencies
run in Compile := Defaults.runTask(fullClasspath in Compile,
mainClass in (Compile, run),
runner in (Compile,run)
).evaluated
// exclude Scala library from assembly
test in assembly := {} /* tests should have been run during CI/CD */
assemblyOption in assembly := (assemblyOption in assembly).value.copy(includeScala = false)
coverallsToken := Some("7d6HwtxY1fkvtUeLaERY8gZaAVcpxITLU")