Commit 9e068e50 authored by Luca Cristaldi's avatar Luca Cristaldi

change test_install to use my container

parent d4bb3a41
Pipeline #325 failed with stages
in 3 minutes and 53 seconds
...@@ -37,6 +37,23 @@ unit-test: ...@@ -37,6 +37,23 @@ unit-test:
- python3 setup.py install - python3 setup.py install
- python3 $(python3 -c "import os,trytond;print(os.path.dirname(trytond.__file__))")/tests/run-tests.py -m $MODULE_NAME - python3 $(python3 -c "import os,trytond;print(os.path.dirname(trytond.__file__))")/tests/run-tests.py -m $MODULE_NAME
#test_install:
# stage: install
# services:
# - postgres:latest
# variables:
# POSTGRES_DB: $DATABASE_NAME
# POSTGRES_USER: tryton
# image: python:3.7.0-slim-stretch
# script:
# - python3 -m pip install lxml psycopg2
# - python3 setup.py install
# - echo -e "[database]\nuri = postgresql://$POSTGRES_USER:@postgres:5432\n[web]\nlisten=[::]#:8000" > trytond.conf
# - export TRYTONPASSFILE=phonypass.notpassword
# - echo "TheContainerWillBeDelatedAnyway" > $TRYTONPASSFILE
# - trytond-admin -c trytond.conf -d $DATABASE_NAME -v --all --email r@ndom.peni #--update-modules-list
# - trytond-admin -c trytond.conf -d $DATABASE_NAME -v -u $MODULE_NAME --install-dependencies
test_install: test_install:
stage: install stage: install
services: services:
...@@ -44,15 +61,14 @@ test_install: ...@@ -44,15 +61,14 @@ test_install:
variables: variables:
POSTGRES_DB: $DATABASE_NAME POSTGRES_DB: $DATABASE_NAME
POSTGRES_USER: tryton POSTGRES_USER: tryton
image: python:3.7.0-slim-stretch image: wifasoi/trytond-base:latest
script: script:
- python3 -m pip install lxml psycopg2
- python3 setup.py install - python3 setup.py install
- echo -e "[database]\nuri = postgresql://$POSTGRES_USER:@postgres:5432\n[web]\nlisten=[::]:8000" > trytond.conf - echo -e "[database]\nuri = postgresql://$POSTGRES_USER:@postgres:5432\n[web]\nlisten=[::]:8000" > trytond.conf
- export TRYTONPASSFILE=phonypass.notpassword - export TRYTONPASSFILE=phonypass.notpassword
- echo "TheContainerWillBeDelatedAnyway" > $TRYTONPASSFILE - echo "TheContainerWillBeDelatedAnyway" > $TRYTONPASSFILE
- trytond-admin -c trytond.conf -d $DATABASE_NAME -v --all --email r@ndom.peni --update-modules-list - trytond-admin -c trytond.conf -d $DATABASE_NAME -v --all --email r@ndom.peni --update-modules-list
- trytond-admin -c trytond.conf -d $DATABASE_NAME -v -u $MODULE_NAME --install-dependencies - trytond-admin -c trytond.conf -d $DATABASE_NAME -v -u $MODULE_NAME --activate-dependencies
# install_module: # install_module:
# stage: deploy # stage: deploy
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment