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