-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy path.travis.yml
36 lines (36 loc) · 1.22 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
language: python
dist: xenial
python:
- "3.6" # current default Python on Travis CI
# command to install dependencies
install:
- pip install -r requirements.txt
- pip install -q Flask=$FLASK_VERSION
#test against various flask versions
env:
-FLASK_VERSION = 1.1.2
cache: pip
#Set up multiple services such as db, and elastic search
services:
-mysql
-elasticsearch
-redis-server
before_install:
- mysql -e 'CREATE DATABASE IF NOT EXISTS test_app utf-8;'
- mysql -u root --default-character-set=utf8 baladay < scripts/models.py
- flask db migrate
- flask db upgrade
- wget https://artifacts.elastic.co/downloads/elasticsearch/elasticsearch-7.9.1-amd64.deb
- wget https://artifacts.elastic.co/downloads/elasticsearch/elasticsearch-7.9.1-amd64.deb.sha512
- shasum -a 512 -c elasticsearch-7.9.1-amd64.deb.sha512
- sudo dpkg -i elasticsearch-7.9.1-amd64.deb
- sudo update-rc.d elasticsearch defaults 95 10
- sudo chown -R elasticsearch:elasticsearch /etc/default/elasticsearch
- sudo service elasticsearch restart
- curl -X GET "localhost:9200/?pretty"
before_script:
- sleep 10
# command to run tests
script:
-flask run
- nose2 tests/