forked from open-horizon/exchange-api
-
Notifications
You must be signed in to change notification settings - Fork 0
/
.travis.yml
48 lines (41 loc) · 2.24 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
services: docker
language: scala
dist: focal
jdk: openjdk11
scala:
- 2.13.5
notifications:
slack:
secure: nPoYZ8FqRziV5+rQAc9GXFWtNsThBbOdxYOY8HpPwNWsWHtC2ZyPJBnNE6XIkmzR7+D5U8yOYqlk2CiqYLlSwa1+bqKuAyOBBhz51pDi8z+YXsjvgTpkxVmKv8N6jntAqo5eBFbVUW+/FPhKBD6qZIkbfRyThZSNZTSTv9oZ02Ynfb4NKuXgZeuinSotOaICiCvzfY4kYoe7EKss/XY6ON8qHUOcIQBsckDHrFEYwF270qNEIccZIkrOr3PKg3mXz2n+65T5i/UDNw3Z8RKDc32Y+TCfyAc3kyuQQYhKhL6/TLwAW/IPNGaFkUfR+2FH+C1VlLJpm1/mBj6uDvHBVRHSEL3ZofYFd5TTzUqkQRINATRQNpFNfjlMT3ifJrSyopKXyMsiea2y3EvM4/D3I5pHRvX2/BqidjJV3b5UIllirq/jk4PrCKshkKEZtC0CBNj4T8ewa9Qr3IxlKTFVHwnW1RWQmAXgFDFpbDzJ4vuLbUDhAKDXukWqoiwxTC3egMPQVnEFvxHVDAqdQUztsUjtg3LVXagLLl6+tYTwY53124aUXSkQMbANL+2ISZuRmg4dheTtaK/bE8L4dCQyyy7HFh03IbZGnGz3bhpDGxTBFAhnEQ4XWzYNpz8rEr0unvQTfBt2dUq4AH5bh1QseFh77lpBYWj9jxndZMbP9Pw=
branches:
only:
- master
env:
- DEBIAN_FRONTEND=noninteractive
DOCKER_NETWORK=exchange-api-network
DOCKER_REGISTRY=openhorizon
EXCHANGE_FE_HEADER=issuer
EXCHANGE_ROOTPW=ci-password
POSTGRES_DB=exchange
POSTGRES_PORT=5432
POSTGRES_USER=admin
before_install:
- sudo apt-get -y update
- sudo apt-get -y -o Dpkg::Options::="--force-confnew" install docker-ce || true
before_script:
- '{ test $TRAVIS_PULL_REQUEST = ''false'' && docker login -u="$DOCKER_HUB_USER" -p="$DOCKER_HUB_PASS"; } || echo ''This is a PR, skipping the login'''
- make .docker-network
- docker run -d -e POSTGRES_HOST_AUTH_METHOD=trust -e POSTGRES_DB=$POSTGRES_DB -e POSTGRES_USER=$POSTGRES_USER --network
$DOCKER_NETWORK --name postgres postgres
- export POSTGRES_HOST=$(docker inspect -f '{{range .NetworkSettings.Networks}}{{.IPAddress}}{{end}}'
postgres)
- sudo mkdir -p /etc/horizon/exchange
- 'sudo bash -c "echo ''{ \"api\": { \"db\": { \"jdbcUrl\": \"jdbc:postgresql://$POSTGRES_HOST:$POSTGRES_PORT/$POSTGRES_DB\",
\"user\": \"$POSTGRES_USER\" }, \"root\": { \"password\": \"$EXCHANGE_ROOTPW\",
\"frontEndHeader\": \"$EXCHANGE_FE_HEADER\" } } }'' > /etc/horizon/exchange/config.json"'
- cat /etc/horizon/exchange/config.json
- unset SBT_OPTS
- make travis-test
script:
# Note: this does NOT run the IBM/OCP cloud tests or the multi-tenancy tests (because this travis script would have to stand up an OCP instance). Those tests must be run in your own dev environment.
- make test