-
Notifications
You must be signed in to change notification settings - Fork 1
/
Copy path.travis.yml
59 lines (59 loc) · 2.72 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
sudo: required
dist: trusty
language: cpp
matrix:
include:
- os: linux
addons:
apt:
sources:
- ubuntu-toolchain-r-test
packages:
- g++-6
- nodejs
- python
- python-pip
env:
- MATRIX_EVAL="CC=gcc-6 && CXX=g++-6"
services:
- docker
before_install:
- eval "${MATRIX_EVAL}"
- docker run -d -p 0.0.0.0:5005:5005 -p 0.0.0.0:5005:5005/udp --name udp-listener mendhak/udp-listener
- docker run -d --publish=7474:7474 --publish=7687:7687 --env=NEO4J_AUTH=none --volume=$HOME/neo4j/data:/data --name=database neo4j
- $CXX -v
- mkdir ../ivan_deps
- sudo cp scripts/linux/deb/build_deps.sh ../ivan_deps
- cd ../ivan_deps && sudo ./build_deps.sh $CXX > deps_log.txt
- sudo ldconfig
- npm install newman --global;
- pip install --user requests
- cd $TRAVIS_BUILD_DIR
- wget https://releases.hashicorp.com/packer/1.3.1/packer_1.3.1_linux_amd64.zip
- unzip packer_1.3.1_linux_amd64.zip
- sudo chmod +x packer
- export LD_LIBRARY_PATH="/usr/local/lib:$LD_LIBRARY_PATH"
install:
- cd $TRAVIS_BUILD_DIR && make CC=$CXX CFLAGS=-O2 && make test CC=$CXX
before_script:
- docker logs database
script:
- cd $TRAVIS_BUILD_DIR/tests && ./tests [unit]
- cd $TRAVIS_BUILD_DIR/tests && ./tests [integration]
- cd $TRAVIS_BUILD_DIR && ./crazy_ivan &
- echo $! > $TRAVIS_BUILD_DIR/pid.txt
- sleep 5
- cd $TRAVIS_BUILD_DIR/tests/postman && newman run ivan_flow.postman_collection.json -e ivan_flow.postman_environment.json
- cd $TRAVIS_BUILD_DIR/tests/postman && newman run ivan_failure_flow.postman_collection.json -e ivan_flow.postman_environment.json
- cd $TRAVIS_BUILD_DIR/tests/netcat && ./udp_test.sh
- kill $(cat $TRAVIS_BUILD_DIR/pid.txt)
- sleep 1
- echo "kill" | nc -u -w 3 $(ip addr show eth0 | grep -Po 'inet \K[\d.]+') 8764
- docker logs udp-listener
after_success:
- cd $TRAVIS_BUILD_DIR
- ./packer build packer.json
- cd scripts/linux && ./push_docker_image.sh $DOCKER_UN $DOCKER_PW $TRAVIS_BRANCH
notifications:
slack:
secure: YGqapA0ZH4TFv9G0otZRcqQXTpL0Y/4J51V0pm6mNp9bQi9XIoE8zoCEtZcCPnEFWjPoq8Nj1tA86WzRnriOzZIkzm83Ou/ZRcB4ZCmro0qC9fffALubzEvbqqG3TW77Xq3N7orz7Bjs8H2nxYgNQPjfQtaIMqL8ziGvf6s22LBQOBlusFJF3uELhtFCXvToKTO6XkkmLQ7Oj/qeX/kF6k7R1+lLna4JVNgkIpoEoubticMqY+/3MiS1tY41Y9phW3rxOi1O4upWnRo0fR/1fXS6Gn2Tr2PBSxdNzaJsbhJWUHf+e4DJtPkuqc7ftqSrb4DZhSukBnjXpMtE45oYcWo3h4txxTGnnzD9yMnEHegvlj1kQbcwCNc8We3RDAP80DWgvH3i1rghJ01n0okOQ4Zokz0Ntw+8pExFXO7qfa1vH3s36oIOF97cU+HWGGxqDmcBNVLNBvYfEWqWEOpZeP5p6YvnOCBwSoPXvjbcu+PeP1n9b+95ZBTTzoTJ5sHy54q7r8o/037n5kij3BfKJIjgVHkFPpXVMWkSsMZnQpBHe0RF+Iiv9SIcySF1ln3jUWIBM4heXYywYNjE6Qpw0xVQ3oq4xBPxmcSN+kcWC7wiwMGLzBQErNhbI2IRNVRAZCWIpGVnrHXB4Ev6+A2YgH4c3pWZsXmXu3L1esLv0ac=