Add travis.yml, reloaded.

This commit is contained in:
nothink 2018-07-25 21:57:29 +09:00
parent 1702833cbf
commit 17a996e330

View file

@ -1,35 +1,32 @@
@@ -0,0 +1,32 @@ sudo: required
sudo: required dist: trusty
dist: trusty
services:
services: - postgresql
- postgresql - elasticsearch
- elasticsearch
matrix:
matrix: include:
include: - language: python
- language: python python:
python: - "3.5"
- "3.5" before_install:
before_install: - sudo apt-get -y install software-properties-common
- sudo apt-get -y install software-properties-common - sudo add-apt-repository -y ppa:mc3man/trusty-media
- sudo add-apt-repository -y ppa:mc3man/trusty-media - sudo apt-get update
- sudo apt-get update - sudo apt-get -y --allow-unauthenticated install ffmpeg
- sudo apt-get -y --allow-unauthenticated install ffmpeg - cp config.yaml.dist config.yaml
- cp config.yaml.dist config.yaml - sed -i -e 's/^database:$/database:\ postgres:\/\/szuru:dog@localhost:5432\/szuru_test/' config.yaml
- sed -i -e 's/^database:$/database:\ postgres:\/\/szuru:dog@localhost:5432\/szuru_test/' config.yaml - sudo -i -u postgres createuser szuru -D -R -S
- sudo -i -u postgres createuser szuru -D -R -S - sudo -i -u postgres createdb szuru_test
- sudo -i -u postgres createdb szuru_test - sudo -i -u postgres psql -c "ALTER USER szuru PASSWORD 'dog';"
- sudo -i -u postgres psql -c "ALTER USER szuru PASSWORD 'dog';" - sed -i -e 's/^api_url:/api_url:\ http:\/\/localhost\/api\//' config.yaml
- sed -i -e 's/^api_url:/api_url:\ http:\/\/localhost\/api\//' config.yaml - sed -i -e 's/^base_url:/base_url:\ http:\/\/localhost\//' config.yaml
- sed -i -e 's/^base_url:/base_url:\ http:\/\/localhost\//' config.yaml - sed -i -e 's/^data_url:/data_url:\ http:\/\/localhost\/data\//' config.yaml
- sed -i -e 's/^data_url:/data_url:\ http:\/\/localhost\/data\//' config.yaml - sed -i -e 's/^data_dir:/data_dir:\ \/data\//' config.yaml
- sed -i -e 's/^data_dir:/data_dir:\ \/data\//' config.yaml install:
install: - cd server
- cd server - pip install -r requirements.txt
- pip install -r requirements.txt script:
script: - alembic upgrade head
- alembic upgrade head - py.test
- py.test
commit:fb8aa1
Add .travis.yml