-
Notifications
You must be signed in to change notification settings - Fork 12
/
config.yml
60 lines (51 loc) · 2.19 KB
/
config.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
53
54
55
56
57
58
59
60
version: 2.1
jobs:
build:
docker:
- image: openjdk:8
working_directory: ~/repo
steps:
- checkout
- run:
name: install coursier
command: curl -L -o coursier https://git.io/vgvpD && chmod +x coursier
# The install started failing on CircleCI, it gets some HTML content instead of the package.
- run:
name: install scalafmt
command: test -f scalafmt || ./coursier bootstrap org.scalameta:scalafmt-cli_2.12:2.7.4 -f -r sonatype:snapshots --main org.scalafmt.cli.Cli --standalone -o scalafmt
- run:
name: install mill
command: sh -c '(echo "#!/usr/bin/env sh" && curl -L https://github.com/lihaoyi/mill/releases/download/0.8.0/0.8.0) > /usr/local/bin/mill && chmod +x /usr/local/bin/mill'
- run:
name: unit and integration tests
#command: mill scalanet.test && mill scalanet.scoverage.htmlReport
command: mill __.test
- run:
name: check that the code is formatted properly
command: test -f scalafmt && ./scalafmt --test || echo "scalafmt not installed"
- when:
condition:
or:
- equal: [ master, << pipeline.git.branch >> ]
- equal: [ develop, << pipeline.git.branch >> ]
steps:
- run:
name: install gpg2
# GPG in docker needs to be run with some additional flags
# and we are not able to change how mill uses it
# this is why we're creating wrapper that adds the flags
command: sh -c "apt update && apt install -y gnupg2 && mv /usr/bin/gpg /usr/bin/gpg-vanilla && echo '#!/bin/sh\n\n/usr/bin/gpg-vanilla --no-tty --pinentry loopback \$@' > /usr/bin/gpg && chmod 755 /usr/bin/gpg && cat /usr/bin/gpg"
- run:
name: install base64
command: apt update && apt install -y cl-base64
- run:
name: publish
command: .circleci/publish
no_output_timeout: 30m
# scoverage disabled
#- store_artifacts:
#path: out/scalanet/scoverage/htmlReport/
workflows:
build_and_publish:
jobs:
- build