2017-11-11 21:34:11 +00:00
|
|
|
---
|
2018-06-26 12:57:18 +00:00
|
|
|
services:
|
|
|
|
- mysql:latest
|
|
|
|
|
|
|
|
variables:
|
|
|
|
MYSQL_DATABASE: re2o
|
|
|
|
MYSQL_ROOT_PASSWORD: re2o
|
|
|
|
|
2017-11-11 21:34:11 +00:00
|
|
|
image: debian:stretch
|
|
|
|
stages:
|
2018-06-26 12:57:18 +00:00
|
|
|
- build
|
2018-06-25 20:16:16 +00:00
|
|
|
- tests
|
2018-06-26 12:57:18 +00:00
|
|
|
- lint
|
2017-11-11 21:34:11 +00:00
|
|
|
|
2018-06-26 12:57:18 +00:00
|
|
|
|
|
|
|
build:
|
|
|
|
stage: build
|
2017-11-11 21:34:11 +00:00
|
|
|
variables:
|
|
|
|
LANG: 'en_US.UTF-8'
|
|
|
|
LC_ALL: 'en_US.UTF-8'
|
|
|
|
LANGUAGE: 'en_US.UTF-8'
|
|
|
|
script:
|
|
|
|
- apt-get -qq update
|
2018-06-26 12:57:18 +00:00
|
|
|
- DEBIAN_FRONTEND=noninteractive apt-get -qq install -y locales
|
2017-11-11 21:34:11 +00:00
|
|
|
- sed -i -e 's/# en_US.UTF-8 UTF-8/en_US.UTF-8 UTF-8/' /etc/locale.gen && dpkg-reconfigure --frontend=noninteractive locales && update-locale LANG=en_US.UTF-8
|
2018-06-26 12:57:18 +00:00
|
|
|
- ./install_re2o.sh ci-setup
|
|
|
|
- cat re2o/settings_local.py
|
|
|
|
|
|
|
|
|
|
|
|
lint:
|
|
|
|
stage: lint
|
|
|
|
variables:
|
|
|
|
LANG: 'en_US.UTF-8'
|
|
|
|
LC_ALL: 'en_US.UTF-8'
|
|
|
|
LANGUAGE: 'en_US.UTF-8'
|
|
|
|
script:
|
2017-12-17 15:21:39 +00:00
|
|
|
- pylint3 --load-plugins pylint_django cotisations machines re2o logs topologie preferences search users || if [ $? -ne 1 ]; then exit 0; else exit 1; fi
|
2017-11-11 21:34:11 +00:00
|
|
|
|
|
|
|
|
2018-06-25 20:16:16 +00:00
|
|
|
tests:
|
|
|
|
stage: tests
|
|
|
|
variables:
|
|
|
|
LANG: 'en_US.UTF-8'
|
|
|
|
LC_ALL: 'en_US.UTF-8'
|
|
|
|
LANGUAGE: 'en_US.UTF-8'
|
|
|
|
script:
|
|
|
|
- python3 manage.py test
|