forked from mneudert/instream
-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy path.travis.yml
58 lines (47 loc) · 1.86 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
language: elixir
env:
global:
- MIX_ENV=test
matrix:
- VER_INFLUXDB=v0.13.0
- VER_INFLUXDB=master
matrix:
allow_failures:
- env: VER_INFLUXDB=master
before_install:
- mkdir "${HOME}/go"
- export GOPATH="${HOME}/go"
- export PATH="${GOPATH}/bin:${PATH}"
- go get github.com/sparrc/gdm
- mkdir -p "${GOPATH}/src/github.com/influxdata"
- cd "${GOPATH}/src/github.com/influxdata"
- wget "https://github.com/influxdata/influxdb/archive/${VER_INFLUXDB}.tar.gz" -O influxdb.tar.gz && tar -xf influxdb.tar.gz
- find . -maxdepth 1 -type d -name 'influxdb*' -exec mv {} influxdb \;
- cd "${GOPATH}/src/github.com/influxdata/influxdb"
- git init .
- gdm restore
- go clean ./...
- go install ./...
- cd "${TRAVIS_BUILD_DIR}"
before_script:
- influxd config > ./influxdb.conf
- nohup "${GOPATH}/bin/influxd" -pidfile ./influxdb.pid -config ./influxdb.conf >>./influxdb.stdout 2>>./influxdb.stderr &
- sleep 5
- curl -G 'http://localhost:8086/query' --data-urlencode "q=CREATE USER instream_test WITH PASSWORD 'instream_test' WITH ALL PRIVILEGES"
- curl -G 'http://localhost:8086/query' --data-urlencode "q=CREATE USER instream_guest WITH PASSWORD 'instream_guest'"
- sed -i 's/auth-enabled = false/auth-enabled = true/' ./influxdb.conf
- echo -e "[[udp]]\n enabled = true\n bind-address = \":8089\"\n database = \"test_database\"\n batch-size = 1000\n batch-timeout = \"1s\"\n batch-pending = 5\n" >> ./influxdb.conf
- kill `cat ./influxdb.pid`
- nohup "${GOPATH}/bin/influxd" -pidfile ./influxdb.pid -config ./influxdb.conf >>./influxdb.stdout 2>>./influxdb.stderr &
- sleep 5
after_failure:
- echo "==> config <=="
- cat ./influxdb.conf
- echo "==> stdout <=="
- cat ./influxdb.stdout
- echo "==> stderr <=="
- cat ./influxdb.stderr
after_success:
- mix coveralls.travis
after_script:
- kill `cat ./influxdb.pid`