-
Notifications
You must be signed in to change notification settings - Fork 26
/
scala.dhall
57 lines (54 loc) · 1.82 KB
/
scala.dhall
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
let GithubActions =
https://regadas.dev/github-actions-dhall/package.dhall
sha256:dfb18adac8746b64040c5387d51769177ce08a2d2a496da2446eb244f34cc21e
let matrix =
toMap { java = [ "8.0.232", "11.0.5" ], scala = [ "2.11.12", "2.12.11" ] }
let setup =
[ GithubActions.steps.actions/checkout
, GithubActions.steps.actions/cache
{ path =
''
~/.sbt
"~/.cache/coursier"
''
, key = "sbt"
, hashFiles =
[ "build.sbt"
, "project/plugins.sbt"
, "project/build.properties"
, "project/Dependencies.scala"
]
}
]
in GithubActions.Workflow::{
, name = "Greeting"
, on = GithubActions.On::{
, push = Some GithubActions.Push::{=}
, pull_request = Some GithubActions.PullRequest::{=}
}
, jobs = toMap
{ checks = GithubActions.Job::{
, name = Some "Checks"
, runs-on = GithubActions.types.RunsOn.ubuntu-latest
, steps =
setup
# [ GithubActions.steps.actions/setup-java { java-version = "11" }
, GithubActions.steps.run
{ run = "sbt scalafmtCheckAll scalafmtSbtCheck" }
]
}
, build = GithubActions.Job::{
, name = Some "Build"
, needs = Some [ "checks" ]
, strategy = Some GithubActions.Strategy::{ matrix }
, runs-on = GithubActions.types.RunsOn.ubuntu-latest
, steps =
setup
# [ GithubActions.steps.actions/setup-java
{ java-version = "\${{ matrix.scala}}" }
, GithubActions.steps.run
{ run = "sbt \"++\${{ matrix.scala}} test\"" }
]
}
}
}