8
0
Fork 0
mirror of https://gitlab2.federez.net/re2o/re2o synced 2024-12-23 23:43:47 +00:00

Test using CI mysql services

This commit is contained in:
Maël Kervella 2018-06-26 12:57:18 +00:00
parent b0f4726952
commit 5de80ada7c
2 changed files with 28 additions and 14 deletions

View file

@ -1,8 +1,31 @@
---
services:
- mysql:latest
variables:
MYSQL_DATABASE: re2o
MYSQL_ROOT_PASSWORD: re2o
image: debian:stretch
stages:
- lint
- build
- tests
- lint
build:
stage: build
variables:
LANG: 'en_US.UTF-8'
LC_ALL: 'en_US.UTF-8'
LANGUAGE: 'en_US.UTF-8'
script:
- apt-get -qq update
- DEBIAN_FRONTEND=noninteractive apt-get -qq install -y locales
- 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
- ./install_re2o.sh ci-setup
- cat re2o/settings_local.py
lint:
stage: lint
@ -11,9 +34,6 @@ lint:
LC_ALL: 'en_US.UTF-8'
LANGUAGE: 'en_US.UTF-8'
script:
- apt-get -qq update
- DEBIAN_FRONTEND=noninteractive apt-get -qq install -y locales python3-django python3-pylint-django
- 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
- pylint3 --load-plugins pylint_django cotisations machines re2o logs topologie preferences search users || if [ $? -ne 1 ]; then exit 0; else exit 1; fi
@ -24,9 +44,4 @@ tests:
LC_ALL: 'en_US.UTF-8'
LANGUAGE: 'en_US.UTF-8'
script:
- apt-get -qq update
- DEBIAN_FRONTEND=noninteractive apt-get -qq install -y locales
- 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
- ./install_re2o.sh auto-setup
- cat re2o/settings_local.py
- python3 manage.py test

View file

@ -766,8 +766,8 @@ main_function() {
echo " LDAP"
echo " * <local_domain> the domain extension to use for the LDAP structure"
echo " in LDAP notation"
echo " * {auto-setup} ---- Automatic setup with default values, use this for quick"
echo " but entire setup."
echo " * {ci-setup} ------ Automatic setup with default values, this command is"
echo " used for building the gitlab CI."
echo ""
else
subcmd="$1"
@ -837,11 +837,10 @@ main_function() {
fi
;;
auto-setup )
ci-setup )
install_requirements
install_database 1 1 re2o re2o re2o
install_ldap 1 re2o "dc=example,dc=net"
write_settings_file 1 "127.0.0.1" re2o re2o re2o \
write_settings_file 1 mysql re2o root re2o \
"cn=admin,dc=example,dc=net" 2 re2o localhost "dc=example,dc=net" \
"mailserver.example.net" 25 "example.net" "re2o.example.net"
update_django