forked from 2600hz/kazoo
-
Notifications
You must be signed in to change notification settings - Fork 0
/
circle.yml
70 lines (67 loc) · 2.22 KB
/
circle.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
61
62
63
64
65
66
67
68
69
70
machine:
environment:
OTP_VERSION: 19.3
PATH: ${HOME}/.kerl/$OTP_VERSION/bin:${PATH}
CHANGED: 'git --no-pager diff --name-only HEAD origin/master -- applications core'
CHANGED_SWAGGER: 'git --no-pager diff --name-only HEAD origin/master -- applications/crossbar/priv/api/swagger.json'
services:
- rabbitmq-server
- docker
# - couchdb-server
general:
branches:
ignore:
- /3\.[0-9]+/
- 4.0
dependencies:
cache_directories:
- ~/.kerl
pre:
- bash ./scripts/circleci-build-erlang.sh:
timeout: 1800
- pip install --upgrade pip
- pip install PyYAML mkdocs pyembed-markdown jsonschema
test:
pre:
- $CHANGED
- ./scripts/state-of-docs.sh || true
- ./scripts/code_checks.bash $($CHANGED)
- |
if [[ ! -z "$($CHANGED)" ]]; then
TO_FMT="$(echo $($CHANGED))" make fmt
fi
- if [[ "$CIRCLE_BRANCH" = 'master' ]]; then make bump-copyright; fi
- . ~/.kerl/$OTP_VERSION/activate && make
- . ~/.kerl/$OTP_VERSION/activate && make code_checks
- ./scripts/validate-js.sh $($CHANGED)
- . ~/.kerl/$OTP_VERSION/activate && make apis
- make docs
- make validate-schemas
- |
if [[ ! -z "$($CHANGED_SWAGGER)" ]]; then
make validate-swagger
npm install swagger-tools && time ./node_modules/swagger-tools/bin/swagger-tools validate applications/crossbar/priv/api/swagger.json
make sdks
fi
- |
if [[ 0 -ne `git status --porcelain | wc -l` ]]; then
echo Unstaged changes!
git status --porcelain
git --no-pager diff
echo 'Maybe try `make apis` and see if that fixes anything ;)'
exit 1
fi
- . ~/.kerl/$OTP_VERSION/activate && make xref
- . ~/.kerl/$OTP_VERSION/activate && make sup_completion
- |
. ~/.kerl/$OTP_VERSION/activate
if [[ ! -z "$($CHANGED)" ]]; then
make build-plt
TO_DIALYZE="$(echo $($CHANGED))" make dialyze
fi
- . ~/.kerl/$OTP_VERSION/activate && make elvis
- . ~/.kerl/$OTP_VERSION/activate && make build-ci-release
- . ~/.kerl/$OTP_VERSION/activate && ./scripts/check-release-startup.sh
post:
- mkdir $CIRCLE_ARTIFACTS/logs
- mv ./_rel/kazoo/log/* $CIRCLE_ARTIFACTS/logs/