-
Notifications
You must be signed in to change notification settings - Fork 5
/
Copy path.gitlab-ci.yml
52 lines (44 loc) · 1.14 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
image: docker:20.10
services:
- name: docker:20.10-dind
command: ["--tls=false"]
variables:
#DOCKER_HOST: "tcp://localhost:2375"
DOCKER_TLS_CERTDIR: ""
DOCKER_DRIVER: "overlay2"
SCALA_VERSION: "3.2.2-RC1"
SBT_VERSION: "1.8.0"
TESTCONTAINERS_RYUK_DISABLED: "true"
stages:
- test
- publish
before_script:
- export PATH="/usr/local/sbt/bin:$PATH"
- apk update
- apk add ca-certificates wget tar bash openjdk17-jdk git bc
- mkdir -p "/usr/local/sbt"
- wget -qO - --no-check-certificate "https://github.com/sbt/sbt/releases/download/v$SBT_VERSION/sbt-$SBT_VERSION.tgz" | tar xz -C /usr/local/sbt --strip-components=1
- sbt sbtVersion
#- docker info
test-coverage:
stage: test
script:
- sbt cov
- chmod +x print-coverage.sh
- ./print-coverage.sh target/scala-$SCALA_VERSION/coverage-report
coverage: /TOTAL_COVERAGE=(\d+.\d+)/
artifacts:
when: always
reports:
cobertura: target/scala-$SCALA_VERSION/coverage-report/cobertura.xml
only:
- master
- tags
- merge_requests
publish-docker:
stage: publish
script:
- sbt docker:publishLocal
only:
- master
- tags