148 lines
4.6 KiB
YAML
148 lines
4.6 KiB
YAML
sudo: required
|
|
dist: trusty
|
|
|
|
services:
|
|
- postgresql
|
|
- elasticsearch
|
|
- docker
|
|
|
|
matrix:
|
|
include:
|
|
# ---- Backend test for on-premise / python 3.6 ----
|
|
- language: python
|
|
python:
|
|
- "3.6"
|
|
allow_failures:
|
|
- python: "3.6"
|
|
name: "Backend test for on-premise / python 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:
|
|
- ./wait-for-es
|
|
- alembic upgrade head
|
|
- py.test
|
|
|
|
# ---- Backend test for on-premise / python 3.7-dev ----
|
|
- language: python
|
|
python:
|
|
- "3.7-dev"
|
|
allow_failures:
|
|
- python: "3.7-dev"
|
|
name: "Backend test for on-premise / python 3.7-dev"
|
|
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:
|
|
- ./wait-for-es
|
|
- alembic upgrade head
|
|
- py.test
|
|
|
|
# ---- Backend test for docker ----
|
|
- language: python
|
|
name: "Backend test for docker"
|
|
before_install:
|
|
- cp server/config.yaml.dist config.yaml
|
|
- cp docker-compose.yml.example docker-compose.yml
|
|
install:
|
|
- docker-compose pull
|
|
- docker-compose build --pull
|
|
- docker-compose up -d
|
|
script:
|
|
- cd server/
|
|
- ./wait-for-es
|
|
- alembic upgrade head
|
|
- py.test
|
|
|
|
# ---- Frontend test ugins npm / nodejs 6 ----
|
|
- language: node_js
|
|
node_js:
|
|
- "6"
|
|
name: "Frontend test ugins npm / nodejs 6"
|
|
install:
|
|
- cd client/
|
|
- npm install
|
|
script:
|
|
- node build.js
|
|
|
|
# ---- Frontend test ugins npm / nodejs 7 ----
|
|
- language: node_js
|
|
node_js:
|
|
- "7"
|
|
name: "Frontend test ugins npm / nodejs 7"
|
|
install:
|
|
- cd client/
|
|
- npm install
|
|
script:
|
|
- node build.js
|
|
|
|
# ---- Frontend test ugins npm / nodejs 8 ----
|
|
- language: node_js
|
|
node_js:
|
|
- "8"
|
|
name: "Frontend test ugins npm / nodejs 8"
|
|
install:
|
|
- cd client/
|
|
- npm install
|
|
script:
|
|
- node build.js
|
|
|
|
# ---- Frontend test ugins npm / nodejs 9 ----
|
|
- language: node_js
|
|
node_js:
|
|
- "9"
|
|
name: "Frontend test ugins npm / nodejs 9"
|
|
install:
|
|
- cd client/
|
|
- npm install
|
|
script:
|
|
- node build.js
|
|
|
|
# ---- Frontend test ugins yarn / nodejs 9 ----
|
|
- language: node_js
|
|
node_js:
|
|
- "9"
|
|
name: "Frontend test ugins yarn / nodejs 9"
|
|
before_install:
|
|
- npm install -g yarn
|
|
install:
|
|
- cd client/
|
|
- yarn install
|
|
script:
|
|
- node build.js
|