This repository has been archived by the owner on Jan 19, 2022. It is now read-only.
-
Notifications
You must be signed in to change notification settings - Fork 13
/
Copy path.travis.yml
49 lines (43 loc) · 1.58 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
language: go
go:
- 1.10.x
addons:
apt:
sources:
- sourceline: "deb http://repo.percona.com/apt $(lsb_release -s -c) main"
key_url: 'http://keyserver.ubuntu.com/pks/lookup?op=get&fingerprint=on&search=0x8507EFA5'
packages:
- percona-toolkit
install:
# Ensure that vendor/ is in sync with code and Gopkg.lock
- curl https://github.com/golang/dep/releases/download/v0.4.1/dep-linux-amd64 -L -o ~/dep && chmod +x ~/dep
- rm -fr vendor/
- ~/dep ensure -v -vendor-only
# Verify dependencies in vendor dir weren't changed
- git diff --exit-code
before_script:
# Stop default MySQL.
- sudo /etc/init.d/mysql stop
# Run docker containers.
- docker-compose up -d
# Wait for MySQL to become available.
- |
until docker-compose exec mysql mysql -e 'SELECT 1' > /dev/null; do
>&2 echo "MySQL is unavailable - sleeping"
sleep 1
done
>&2 echo "MySQL is up"
script:
- tests/runner.sh
# Let's try to build api from current sources similar way it's done in rpm spec file
# https://github.com/Percona-Lab/pmm-server-packaging/blob/32f8faf6b478bad9f6c3a096cd60517b0d384467/rhel/SPECS/percona-qan-api.spec#L39-L44
- export GOPATH=$(pwd)
- mkdir -p /tmp/qan-api
- cp -R ./ /tmp/qan-api
- mkdir -p ./src/github.com/percona
- mv /tmp/qan-api ./src/github.com/percona
- go build -o ./revel ./src/github.com/percona/qan-api/vendor/github.com/revel/cmd/revel
- ln -s $(pwd)/src/github.com/percona/qan-api/vendor/github.com/revel src/github.com/revel
- ./revel build github.com/percona/qan-api qan-api prod
notifications:
email: false