forked from cloudstateio/cloudstate
-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy path.travis.yml
111 lines (102 loc) · 5.01 KB
/
.travis.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
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
language: scala
dist: xenial
jdk:
- openjdk11
scala:
- 2.12.9
env:
global:
# GitHub personal access token
- secure: nPtepdKPvidwnxijiaIQiKnwuNvy+P4YAQUe4+1UzsiNMLILC/8UgWlUHoJMmlcS9ycYM5G1EwQNiT3hJetJbRL4VN3/uhnNpntmucASpC1KbpGjl3gaMfx7yDnJj252aj0yrSDoxJHDXe9p7zBY+bV+Dvp/SWGO1216ZgpiEx+T2n7QJ7kj5dhU+j6AIPj2R1U2lGOiAjHaCudGlv7evswSYrfdXL9yRZGXxeM361vien1akwTjSJzZr/EZmXhVyBSEWKitWMLuboCmXaUvr+VZVm5FkY8X7FKKBre05/itWGQTrnrEaKaUMd1bW+GfPOyFTjmuJnLiwmSmeEx2o/krQt9EfyFJpSfiX/b5bxYQan+ozxiwrsDF0/7tYfGBVg48miccqN+oAtAD1X8cWYa9svLOwKnv82ELq/18QE5OY9DPc9zARGDnPxwZ96Zl6dDtQkJz2+qBo/EU8dU2q1uaNTvuImmtLAHQZ2PtzdaGkklQQ3YvfZeWyD/fTVZdMQi2NXv0LRHkwAxf65vwrf84Edyy+HlqD5zTpKzhr1q6+wj54oOsQDnK6gSmmguG5Nd2HbJQxQhDlEZQ6+b00TY5WxYPG5Qo5zH0TXbu+/txLZlZOyJ5qJqGCICC1QW3YNDvFbTBIYGQUKVZ6vadXD8SqFUNvYK/wXXLYmdoXm8=
# DockerHub password for cloudstatebot
- secure: "3YFGW7bUil+CFQSbgjCSMnFezWIGFdv6/eaNlKKhaxOueDoLmVrLqNhCXkS2Nz3f4tvPFzDN9VH3RyzEIG1u53nQvMw7vceV5szj4oyM4pGZ3TnugtEQFfRHJsUFAWFuRTr9etukBlxCo8HHT3FvcM5uKYQAmBt23wO/NuF8hFXDYQ6c6WHTvP6gzLP5lG70fVJ3ViA1QZEfOaEnOJNqknFtmGj8j0pQTE8oxXTSz61KDBzN3C9PtupDo2Xj0dtpurSZnGRt4BJYoBJkgBiQQJ0W/p5YWGHewdyV12/GgafhkyrPkSx02iOsq3yJrnX238xP/2QQCpMTtZ1lVMQsdXYmpX40hCoEXdxG1qlhH4ISNtXmck1J1VMRVg+sg8+PyFlRZObKcHtIWeGYOu8+T34zn0t+7VPswq0UY2xtPhetk9csNNtGQ7vTKKNFcFUdrROSEV/wmV/eudue473j5YZDDGEm43a04P81FsHVWxV9+uwuCiofMz3E1TcZJkySHYt3XnFhWGtdbJMHOkaYsrW++UA1wjWgn/EPcwNWpxiKJVoQmw3WYb0PH7ZXWaeQ/hqGpT+lhQzrNlP18us72c6kx7KW4aHgpWHEqsjceuSkoaAbCvxQxGbJqwDRyzOKdqTiVpapvd/wXAdatzcf1O+0n3C2lzLUbTpSkRx+s/8="
services:
- docker
jobs:
include:
- stage: Format checks
name: "Code format check (address by running `sbt scalafmtAll scalafmtSbt`)"
script: sbt scalafmtCheckAll scalafmtSbtCheck || { echo "[error] Code not formatted prior to commit. Run 'sbt scalafmtAll scalafmtSbt' then commit the reformatted code."; false; }
- stage: Unit tests
name: npm tests
before_script:
- cd node-support && npm install && cd -
- cd samples/js-shopping-cart && npm install && cd -
script:
- cd node-support && npm test && cd -
- cd samples/js-shopping-cart && npm test && cd -
- name: sbt tests
before_script:
- cd node-support && npm install && cd -
- cd samples/js-shopping-cart && npm install && cd -
- sbt update
- docker pull google/cloud-sdk:latest
- docker run --rm --expose=8085 --volume=/data -m 140MB --name=googlepubsub -d -p 8085:8085 google/cloud-sdk:latest /bin/sh -c "gcloud beta emulators pubsub start --project=test --host-port=0.0.0.0:8085 --data-dir=/data"
- docker ps -a
script: sbt -jvm-opts travis/jvmopts 'set concurrentRestrictions in Global += Tags.limitAll(1)' test
after_script:
- docker stop googlepubsub
- name: docs tests
before_script:
- cd node-support && npm install && cd -
- cd docs/src/test/js && npm install && cd -
script:
- sbt 'set concurrentRestrictions in Global += Tags.limitAll(1)' docs/paradox docs/test
- cd docs/src/test/js && npm test && cd -
- stage: Integration tests
name: TCK
before_script:
- sbt update
- cd node-support && npm install && cd -
- cd samples/js-shopping-cart && npm install && cd -
script:
- sbt 'set concurrentRestrictions in Global += Tags.limitAll(1)' tck/it:test
- name: Minikube smoke test
before_script:
- bin/prepare-minikube-travis.sh
script:
- bin/deploy-to-minikube.sh
- bin/run-test-java-shopping-cart-minikube.sh
- stage: Deploy
name: Deploy documentation to cloudstate.io
if: branch = master AND type = push
before_script: cd node-support && npm install && cd -
script: sbt docs/paradox
deploy:
provider: pages
github_token: "$GITHUB_TOKEN"
local_dir: docs/target/paradox/site/main
repo: cloudstateio/docs
target_branch: master
skip_cleanup: true
keep_history: true
email: [email protected]
name: Cloudstate Deployment Bot
on:
branch: master
- stage: Deploy
name: Publish release
if: tag =~ ^v
script:
- echo "$DOCKER_PASSWORD" | docker login -u cloudstatebot --password-stdin
- sbt "set concurrentRestrictions in Global += Tags.limitAll(1)" "dockerBuildAllNonNative publish" operator/docker:publish
- stage: Deploy
name: Publish latest builds
if: branch = master AND type = push
script:
- echo "$DOCKER_PASSWORD" | docker login -u cloudstatebot --password-stdin
- sbt -Duse.native.builds=false -Ddocker.tag=latest "set concurrentRestrictions in Global += Tags.limitAll(1)" "dockerBuildAllNonNative publish" operator/docker:publish
cache:
directories:
- "$HOME/.ivy2/cache"
- "$HOME/.sbt"
- "$HOME/.npm"
- "$HOME/.coursier"
before_cache:
- du -h -d 1 $HOME/.ivy2/
- du -h -d 2 $HOME/.sbt/
- du -h -d 4 $HOME/.coursier/
- rm -fv $HOME/.ivy2/.sbt.ivy.lock
- find $HOME/.ivy2/cache -name "ivydata-*.properties" -print -delete
- find $HOME/.sbt -name "*.lock" -print -delete
- find $HOME/.coursier -name "*.lock" -print -delete