-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy path.gitlab-ci.yml
53 lines (40 loc) · 1.48 KB
/
.gitlab-ci.yml
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
### vim: tabstop=2 shiftwidth=2 softtabstop=2 smarttab expandtab autoindent
###
### E257.FI: tackler
### https://gitlab.com/e257/accounting/tackler
###
# sbtscala/scala-sbt images have ready-to-go sbt and scala at user's home,
# but that location and especially ~/.ivy2 is not cache-able by GitLab:
# https://gitlab.com/gitlab-org/gitlab-runner/issues/327
before_script:
- git submodule update --init --recursive
- mkdir -p sbt-cache
- mkdir -p sbt-cache/coursier
- "[ -d sbt-cache/sbt ] || cp -a $HOME/.sbt/ sbt-cache/sbt"
- "[ -d sbt-cache/coursier/cache ] || cp -a $HOME/.cache/coursier/v1 sbt-cache/coursier/cache"
cache:
key: "$CI_COMMIT_REF_SLUG"
untracked: true
paths:
- "sbt-cache/sbt/1.0"
- "sbt-cache/sbt/boot"
- "sbt-cache/coursier/cache"
variables:
SBT_OPTS: "-Dsbt.log.noformat=true -Dsbt.global.base=sbt-cache/sbt/1.0 -Dsbt.boot.directory=sbt-cache/sbt/boot -Dsbt.coursier.home=sbt-cache/coursier/cache"
test·jdk17:
image: "sbtscala/scala-sbt:eclipse-temurin-focal-17.0.8.1_1_1.9.7_2.13.12"
stage: "test"
script:
- sbt "clean" "test" "it:test" "cli/assembly"
codecov:
image: "sbtscala/scala-sbt:eclipse-temurin-focal-17.0.8.1_1_1.9.7_2.13.12"
stage: "test"
script:
- sbt "clean" coverage "test" "it:test"
- sbt "coverageAggregate"
coverage: '/All done. Coverage was stmt=\[\d+.\d+%\]/'
artifacts:
reports:
coverage_report:
coverage_format: cobertura
path: target/scala-2.13/coverage-report/cobertura.xml