-
Notifications
You must be signed in to change notification settings - Fork 28
/
.travis.yml
40 lines (34 loc) · 1.34 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
sudo: required
services:
- docker
language: bash
install:
# Install latest stable docker
- sudo apt-get update
- sudo add-apt-repository "deb [arch=amd64] https://download.docker.com/linux/ubuntu $(lsb_release -cs) stable"
- sudo apt-get install docker-ce=17.09.0~ce-0~ubuntu
- export PATH=bin/linux/amd64:tests/cli/testing:$PATH
- export GOPATH="" # Make sure to use temporary directory on travis
before_script:
script:
- ampmake clean build-base build-plugins build-cli
# Tests: Deploy amp cluster
- sudo sysctl -w vm.max_map_count=262144
- sudo modprobe ip_vs ip_vs_rr
- docker swarm init --advertise-addr 127.0.0.1
- docker secret create amplifier_yml tests/test.amplifier.yml
- amp cluster create
# Tests: CLI
- sudo apt-get install pcregrep
- sudo mkdir -p $HOME/.config/amp
- sudo chown -R $(id -u):$(id -g) $HOME/.config/amp
- TESTINCLUDE=tests/cli/testing testrunner tests/cli
# Tests: Integration
- docker run -it --rm --network core -v $PWD:/go/src/github.com/appcelerator/amp -w /go/src/github.com/appcelerator/amp appcelerator/amptools go test github.com/appcelerator/amp/tests/integration/...
# Tests: Teardown
- amp cluster rm
#- ampmake lint
after_success:
- if [ "$TRAVIS_BRANCH" == "master" ] && [ "$TRAVIS_PULL_REQUEST" == "false" ]; then
echo "Docker image publication has been disabled for now";
fi