-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy path.travis.yml
More file actions
45 lines (40 loc) · 1.31 KB
/
.travis.yml
File metadata and controls
45 lines (40 loc) · 1.31 KB
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
# https://docs.travis-ci.com/user/getting-started/
language: go
go:
- 1.10.4
branches:
only:
- master
os:
- linux
dist: trusty
sudo: required
env:
- TRAVIS_NODE_VERSION="8"
addons:
hosts:
- mysql
- redis
apt:
packages:
- mysql-client-5.6
services:
- mysql
- redis-server
- docker
before_install:
# https://docs.travis-ci.com/user/customizing-the-build/#Installing-a-Second-Programming-language
- rm -rf ~/.nvm && git clone https://github.com/creationix/nvm.git ~/.nvm && (cd ~/.nvm && git checkout `git describe --abbrev=0 --tags`) && source ~/.nvm/nvm.sh && nvm install $TRAVIS_NODE_VERSION
- go get -v github.com/golang/dep/cmd/dep
- go get -v github.com/GeertJohan/go.rice/rice
install:
# Install project dependencies
- make install
before_script:
# Create MySQL database and user
- mysql -u root -e "USE mysql;CREATE DATABASE IF NOT EXISTS test DEFAULT CHARSET utf8mb4 COLLATE utf8mb4_unicode_ci;CREATE USER 'foo'@'localhost' IDENTIFIED BY 'test1234';GRANT ALL PRIVILEGES ON test.* TO 'foo'@'localhost' IDENTIFIED BY 'test1234';SET GLOBAL TIME_ZONE = '+8:00';SET TIME_ZONE = '+8:00';FLUSH PRIVILEGES;"
- sudo redis-server /etc/redis/redis.conf --daemonize yes --requirepass '5RdX!zAq1'
script:
- make test
- make package
- docker build -f Dockerfile -t lavenderx/squirrel .