41 lines
826 B
YAML
41 lines
826 B
YAML
image: python:3.5
|
|
|
|
services:
|
|
- postgres:latest
|
|
|
|
variables:
|
|
POSTGRES_DB: ci
|
|
POSTGRES_USER: postgres
|
|
POSTGRES_PASSWORD: postgres
|
|
|
|
stages:
|
|
- test
|
|
- lint
|
|
|
|
test:
|
|
stage: test
|
|
variables:
|
|
DATABASE_URL: "postgresql://postgres:postgres@postgres:5432/$POSTGRES_DB"
|
|
script:
|
|
- python -V
|
|
- pip install -r requirements.txt
|
|
- cp sikweb/settings-sample.py sikweb/default_settings.py
|
|
- cp sikweb/.ci-settings.py sikweb/settings.py
|
|
- python manage.py migrate --noinput
|
|
- python manage.py createdefaultadmin
|
|
- python manage.py test
|
|
|
|
pep8:
|
|
stage: lint
|
|
script:
|
|
- pip install -r requirements.txt
|
|
- pep8 --count .
|
|
|
|
eslint:
|
|
image: node:7.10.0
|
|
stage: lint
|
|
script:
|
|
- npm install -g eslint
|
|
- eslint .
|
|
|