-
Notifications
You must be signed in to change notification settings - Fork 2
/
.travis.yml
29 lines (23 loc) · 933 Bytes
/
.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
sudo: required
env:
DOCKER_COMPOSE_VERSION: 1.4.2
services:
- docker
- mysql
before_install:
- sudo rm /usr/local/bin/docker-compose
- curl -L https://github.com/docker/compose/releases/download/${DOCKER_COMPOSE_VERSION}/docker-compose-`uname -s`-`uname -m` > docker-compose
- chmod +x docker-compose
- sudo mv docker-compose /usr/local/bin
- echo "MYSQL_URI=mysql://root:@127.0.0.1/GUISHENGSQL" > guisheng/guisheng.env
before_script:
- mysql -u root -e 'CREATE DATABASE GUISHENGSQL;'
script:
- docker-compose -f guisheng/docker-compose-ci.yml build
- docker-compose -f guisheng/docker-compose-ci.yml up -d
- docker exec guisheng python manage.py db init
- docker exec guisheng python manage.py db migrate
- docker exec guisheng python manage.py db upgrade
- docker exec guisheng python manage.py insert_roles
- docker exec guisheng python manage.py add_test_admin
- docker exec guisheng python manage.py test