-
Notifications
You must be signed in to change notification settings - Fork 133
/
.travis.yml
86 lines (86 loc) · 3.42 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
dist: trusty
sudo: required
language: javascript
services:
- docker
notifications:
email: false
before_install:
- curl -fsSL https://download.docker.com/linux/ubuntu/gpg | sudo apt-key add -
- sudo add-apt-repository "deb [arch=amd64] https://download.docker.com/linux/ubuntu $(lsb_release -cs) stable"
- sudo apt-get update
- sudo apt-get -y -o Dpkg::Options::="--force-confnew" install docker-ce
- sudo sudo curl -L https://github.com/docker/compose/releases/download/1.21.2/docker-compose-`uname -s`-`uname -m` -o /usr/local/bin/docker-compose
- sudo chmod +x /usr/local/bin/docker-compose
script: docker pull $IMAGE_BUILD;
docker tag $IMAGE_BUILD $IMAGE_LATEST;
if [[ "$TESTS" == "integration:geth" ]]; then
travis_wait 30 npm run docker:run:test:integration:geth;
elif [[ "$TESTS" == "integration:parity" ]]; then
travis_wait 30 npm run docker:run:test:integration:parity;
elif [[ "$TESTS" == "security:mythril" ]]; then
travis_wait 30 npm run docker:run:test:security:mythril;
cat source/contracts/test-results.log;
elif [[ "$TESTS" == "security:maian" ]]; then
travis_wait 30 npm run docker:run:test:security:maian;
elif [[ "$TESTS" == "security:smt" ]]; then
travis_wait 30 npm run docker:run:test:security:smt;
elif [[ "$TESTS" == "security:oyente" ]]; then
travis_wait 30 npm run docker:run:test:security:oyente;
else
travis_wait 30 npm run docker:run:test:unit -- $TESTS;
fi
jobs:
include:
- stage: build
script: docker login -u "$DOCKER_USERNAME" -p "$DOCKER_PASSWORD";
docker pull $IMAGE_LATEST;
npm run docker:build;
docker tag $IMAGE_LATEST $IMAGE_BUILD;
docker push $IMAGE_BUILD
env:
- DOCKER_USERNAME=augurintegration
- secure: "E/KuY851UD21wGg82orQJBWzAiIBAvFJAvJpMX/Msce8nS4bBodNpBMVf7Ya0rQwV2hh9ngouFnzabSyv1AV1tlRfV5kp0MjfOs+AP5SonIU3Eeh8+bvXdypMuJOm5zZIKvqkVd7Sm1Er9fXWvN1PVaktq6Ls/zf3iG1I1lI8pU="
- stage: deploy
script: skip
env:
- DOCKER_USERNAME=augurintegration
- secure: "E/KuY851UD21wGg82orQJBWzAiIBAvFJAvJpMX/Msce8nS4bBodNpBMVf7Ya0rQwV2hh9ngouFnzabSyv1AV1tlRfV5kp0MjfOs+AP5SonIU3Eeh8+bvXdypMuJOm5zZIKvqkVd7Sm1Er9fXWvN1PVaktq6Ls/zf3iG1I1lI8pU="
- TESTS=
deploy: &script
provider: script
skip_cleanup: true
script: echo "$DOCKER_PASSWORD" | docker login -u "$DOCKER_USERNAME" --password-stdin;
docker pull $IMAGE_BUILD;
docker tag $IMAGE_BUILD $IMAGE_LATEST;
docker push $IMAGE_LATEST
if: type = push
stages:
- build
- test
- name: deploy
if: branch = master or tag =~ ^v\d+\.\d+\.\d+(-\d+)?$
git:
depth: 5
branches:
only:
- master
- /^v\d+\.\d+\.\d+(-\d+)?$/
env:
global:
- IMAGE_BUILD=augurproject/augur-core:build.${TRAVIS_BUILD_NUMBER}
- IMAGE_LATEST=augurproject/augur-core:latest
matrix:
- TESTS="tests/test*.py tests/libraries tests/trading"
- TESTS="tests/reporting"
- TESTS="tests/fuzzy"
- TESTS="tests/unit"
- TESTS="tests/test*.py tests/libraries tests/trading" --subFork
- TESTS="tests/reporting" --subFork
- TESTS="tests/fuzzy" --subFork
- TESTS="tests/unit" --subFork
- TESTS="integration:geth"
- TESTS="integration:parity"
- TESTS="security:oyente"
- TESTS="security:mythril"
- TESTS="security:maian"