-
-
Notifications
You must be signed in to change notification settings - Fork 401
/
Copy pathbuild.mill
49 lines (42 loc) · 1.29 KB
/
build.mill
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
package build
import mill._, scalalib._
object `package` extends RootModule with ScalaModule {
def scalaVersion = "2.13.8"
override def ivyDeps = Agg(
ivy"com.lihaoyi::cask:0.9.1",
ivy"com.lihaoyi::scalatags:0.13.1",
ivy"com.lihaoyi::upickle:3.1.0",
ivy"com.lihaoyi::scalasql:0.1.19",
ivy"com.h2database:h2:2.2.224"
)
object test extends ScalaTests {
def testFramework = "utest.runner.Framework"
override def ivyDeps = Agg(
ivy"com.lihaoyi::utest:0.8.5",
ivy"com.lihaoyi::requests:0.6.9",
ivy"com.dimafeng::testcontainers-scala-postgresql:0.43.0",
ivy"com.dimafeng::testcontainers-scala-scalatest:0.43.0",
ivy"org.testcontainers:postgresql:1.19.1"
)
}
}
// This example demonstrates how to set up a simple Scala webserver
// implementing the popular Todo-MVC demo application. It uses the
// Cask web framework to handle HTTP requests and Scalasql to interact
// with an in-memory H2 database. It includes a test suite
// that spins up the web server locally, creates a postgres testcontainer
// and makes HTTP requests against it.
/** Usage
*
* > ./mill test
* + webapp.WebAppTests.simpleRequest...
*
* > ./mill runBackground
*
* > curl http://localhost:8080
* ...What needs to be done...
* ...
*
* > ./mill clean runBackground
*
*/