42 lines
1.5 KiB
YAML
42 lines
1.5 KiB
YAML
sudo: required
|
|
dist: trusty
|
|
|
|
services:
|
|
- postgresql
|
|
- elasticsearch
|
|
|
|
matrix:
|
|
include:
|
|
- language: python
|
|
python:
|
|
- "3.5"
|
|
- "3.6"
|
|
before_install:
|
|
- sudo apt-get -y install software-properties-common
|
|
- sudo add-apt-repository -y ppa:mc3man/trusty-media
|
|
- sudo apt-get update
|
|
- sudo apt-get -y --allow-unauthenticated install ffmpeg
|
|
- sudo -i -u postgres createuser szuru -D -R -S
|
|
- sudo -i -u postgres createdb szuru_test
|
|
- sudo -i -u postgres psql -c "ALTER USER szuru PASSWORD 'dog';"
|
|
- cd server
|
|
- cp config.yaml.dist ../config.yaml.dist
|
|
- cp config.yaml.dist ../config.yaml
|
|
- sed -i -e 's/^#debug:/debug:/' ../config.yaml
|
|
- sed -i -e 's/^#show_sql:/show_sql:/' ../config.yaml
|
|
- sed -i -e 's/^#data_url:/data_url:/' ../config.yaml
|
|
- sed -i -e 's/^#data_dir:/data_dir:/' ../config.yaml
|
|
- sed -i -e 's/^#database:$/database:\ postgres:\/\/szuru:dog@localhost:5432\/szuru_test/' ../config.yaml
|
|
- sed -i -e 's/^#elasticsearch:/elasticsearch:/' ../config.yaml
|
|
- sed -i -e 's/^# / /' ../config.yaml
|
|
install:
|
|
- pip install -r requirements.txt
|
|
- pip install -r dev-requirements.txt
|
|
script:
|
|
- python -c "print(os.getenv('CI'))"
|
|
- pycodestyle wait-for-es
|
|
- pycodestyle generate-thumb
|
|
- pycodestyle szurubooru/
|
|
- ./wait-for-es
|
|
- alembic upgrade head
|
|
- py.test
|