mirror of
https://gitlab.com/flectra-community/reporting-engine.git
synced 2024-11-14 18:22:04 +00:00
223 lines
10 KiB
YAML
223 lines
10 KiB
YAML
|
image: ubuntu:focal
|
||
|
|
||
|
stages:
|
||
|
- testall
|
||
|
- testsingle
|
||
|
|
||
|
variables:
|
||
|
POSTGRES_DB: postgres
|
||
|
POSTGRES_USER: flectra
|
||
|
POSTGRES_PASSWORD: flectra
|
||
|
POSTGRES_HOST: postgres
|
||
|
POSTGRES_PORT: "5432"
|
||
|
|
||
|
services:
|
||
|
- name: postgres:12-alpine
|
||
|
alias: psql
|
||
|
|
||
|
|
||
|
test_all_modules:
|
||
|
stage: testall
|
||
|
image:
|
||
|
name: registry.gitlab.com/jamotion/flectra/ubuntudev:2-latest
|
||
|
entrypoint: ["/bin/sh", "-c"]
|
||
|
script:
|
||
|
- apt-get install -y p7zip-full
|
||
|
- apt-get install -y expect-dev
|
||
|
- pip3 install -r ${CI_PROJECT_DIR}/requirements.txt
|
||
|
- su - flectra -c "mkdir ~/others"
|
||
|
- 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
|
||
|
- mkdir ${CI_PROJECT_DIR}/ci_data
|
||
|
- wget -O ${CI_PROJECT_DIR}/ci_data/test_base.zip https://gitlab.com/flectra-community/devops/oca2fc/raw/master/ci_data/test_base.zip
|
||
|
- 7z x -o ${CI_PROJECT_DIR}/ci_data/ ${CI_PROJECT_DIR}/ci_data/test_base.zip
|
||
|
- export PGPASSWORD="flectra"
|
||
|
- createdb -h psql -U flectra -O flectra -T template1 test_all
|
||
|
- psql -h psql -U flectra -d test_all -f ${CI_PROJECT_DIR}/ci_data/dump.sql
|
||
|
- su - flectra -c "mkdir -p ~/.local/share/filestore"
|
||
|
- mv ${CI_PROJECT_DIR}/ci_data/filestore /opt/flectra/.local/share/filestore/test_all
|
||
|
- chown -R flectra.flectra /opt/flectra/.local/share/filestore/test_all
|
||
|
- su - flectra -c "/opt/flectra/flectra-bin
|
||
|
--addons-path ${CI_PROJECT_DIR}
|
||
|
--db_host psql
|
||
|
--db_port 5432
|
||
|
--db_user flectra
|
||
|
--db_password flectra
|
||
|
--database test_all
|
||
|
--test-enable
|
||
|
--init report_qweb_encrypt,base_comment_template,report_xlsx,report_xlsx_helper,report_xlsx_helper_demo
|
||
|
--stop-after-init
|
||
|
--log-level error
|
||
|
--log-handler flectra.addons.report_qweb_encrypt:TEST
|
||
|
--log-handler flectra.addons.base_comment_template:TEST
|
||
|
--log-handler flectra.addons.report_xlsx:TEST
|
||
|
--log-handler flectra.addons.report_xlsx_helper:TEST
|
||
|
--log-handler flectra.addons.report_xlsx_helper_demo:TEST
|
||
|
"
|
||
|
|
||
|
|
||
|
test_module_report_qweb_encrypt:
|
||
|
stage: testsingle
|
||
|
when: on_failure
|
||
|
image:
|
||
|
name: registry.gitlab.com/jamotion/flectra/ubuntudev:2-latest
|
||
|
entrypoint: ["/bin/sh", "-c"]
|
||
|
script:
|
||
|
- apt-get install -y p7zip-full
|
||
|
- apt install -y expect-dev
|
||
|
- pip3 install -r ${CI_PROJECT_DIR}/requirements.txt
|
||
|
- su - flectra -c "mkdir ~/others"
|
||
|
- 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
|
||
|
- mkdir ${CI_PROJECT_DIR}/ci_data
|
||
|
- wget -O ${CI_PROJECT_DIR}/ci_data/test_base.zip https://gitlab.com/flectra-community/devops/oca2fc/raw/master/ci_data/test_base.zip
|
||
|
- 7z x -o ${CI_PROJECT_DIR}/ci_data/ ${CI_PROJECT_DIR}/ci_data/test_base.zip
|
||
|
- export PGPASSWORD="flectra"
|
||
|
- createdb -h psql -U flectra -O flectra -T template1 test_report_qweb_encrypt
|
||
|
- psql -h psql -U flectra -d test_report_qweb_encrypt -f ${CI_PROJECT_DIR}/ci_data/dump.sql
|
||
|
- su - flectra -c "mkdir -p ~/.local/share/filestore"
|
||
|
- mv ${CI_PROJECT_DIR}/ci_data/filestore /opt/flectra/.local/share/filestore/test_report_qweb_encrypt
|
||
|
- chown -R flectra.flectra /opt/flectra/.local/share/filestore/test_report_qweb_encrypt
|
||
|
- su - flectra -c "/opt/flectra/flectra-bin
|
||
|
--addons-path ${CI_PROJECT_DIR}
|
||
|
--db_host psql
|
||
|
--db_port 5432
|
||
|
--db_user flectra
|
||
|
--db_password flectra
|
||
|
--database test_report_qweb_encrypt
|
||
|
--test-enable -i report_qweb_encrypt
|
||
|
--stop-after-init
|
||
|
--log-level error
|
||
|
--log-handler flectra.addons.report_qweb_encrypt:TEST"
|
||
|
|
||
|
test_module_base_comment_template:
|
||
|
stage: testsingle
|
||
|
when: on_failure
|
||
|
image:
|
||
|
name: registry.gitlab.com/jamotion/flectra/ubuntudev:2-latest
|
||
|
entrypoint: ["/bin/sh", "-c"]
|
||
|
script:
|
||
|
- apt-get install -y p7zip-full
|
||
|
- apt install -y expect-dev
|
||
|
- pip3 install -r ${CI_PROJECT_DIR}/requirements.txt
|
||
|
- su - flectra -c "mkdir ~/others"
|
||
|
- 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
|
||
|
- mkdir ${CI_PROJECT_DIR}/ci_data
|
||
|
- wget -O ${CI_PROJECT_DIR}/ci_data/test_base.zip https://gitlab.com/flectra-community/devops/oca2fc/raw/master/ci_data/test_base.zip
|
||
|
- 7z x -o ${CI_PROJECT_DIR}/ci_data/ ${CI_PROJECT_DIR}/ci_data/test_base.zip
|
||
|
- export PGPASSWORD="flectra"
|
||
|
- createdb -h psql -U flectra -O flectra -T template1 test_base_comment_template
|
||
|
- psql -h psql -U flectra -d test_base_comment_template -f ${CI_PROJECT_DIR}/ci_data/dump.sql
|
||
|
- su - flectra -c "mkdir -p ~/.local/share/filestore"
|
||
|
- mv ${CI_PROJECT_DIR}/ci_data/filestore /opt/flectra/.local/share/filestore/test_base_comment_template
|
||
|
- chown -R flectra.flectra /opt/flectra/.local/share/filestore/test_base_comment_template
|
||
|
- su - flectra -c "/opt/flectra/flectra-bin
|
||
|
--addons-path ${CI_PROJECT_DIR}
|
||
|
--db_host psql
|
||
|
--db_port 5432
|
||
|
--db_user flectra
|
||
|
--db_password flectra
|
||
|
--database test_base_comment_template
|
||
|
--test-enable -i base_comment_template
|
||
|
--stop-after-init
|
||
|
--log-level error
|
||
|
--log-handler flectra.addons.base_comment_template:TEST"
|
||
|
|
||
|
test_module_report_xlsx:
|
||
|
stage: testsingle
|
||
|
when: on_failure
|
||
|
image:
|
||
|
name: registry.gitlab.com/jamotion/flectra/ubuntudev:2-latest
|
||
|
entrypoint: ["/bin/sh", "-c"]
|
||
|
script:
|
||
|
- apt-get install -y p7zip-full
|
||
|
- apt install -y expect-dev
|
||
|
- pip3 install -r ${CI_PROJECT_DIR}/requirements.txt
|
||
|
- su - flectra -c "mkdir ~/others"
|
||
|
- 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
|
||
|
- mkdir ${CI_PROJECT_DIR}/ci_data
|
||
|
- wget -O ${CI_PROJECT_DIR}/ci_data/test_base.zip https://gitlab.com/flectra-community/devops/oca2fc/raw/master/ci_data/test_base.zip
|
||
|
- 7z x -o ${CI_PROJECT_DIR}/ci_data/ ${CI_PROJECT_DIR}/ci_data/test_base.zip
|
||
|
- export PGPASSWORD="flectra"
|
||
|
- createdb -h psql -U flectra -O flectra -T template1 test_report_xlsx
|
||
|
- psql -h psql -U flectra -d test_report_xlsx -f ${CI_PROJECT_DIR}/ci_data/dump.sql
|
||
|
- su - flectra -c "mkdir -p ~/.local/share/filestore"
|
||
|
- mv ${CI_PROJECT_DIR}/ci_data/filestore /opt/flectra/.local/share/filestore/test_report_xlsx
|
||
|
- chown -R flectra.flectra /opt/flectra/.local/share/filestore/test_report_xlsx
|
||
|
- su - flectra -c "/opt/flectra/flectra-bin
|
||
|
--addons-path ${CI_PROJECT_DIR}
|
||
|
--db_host psql
|
||
|
--db_port 5432
|
||
|
--db_user flectra
|
||
|
--db_password flectra
|
||
|
--database test_report_xlsx
|
||
|
--test-enable -i report_xlsx
|
||
|
--stop-after-init
|
||
|
--log-level error
|
||
|
--log-handler flectra.addons.report_xlsx:TEST"
|
||
|
|
||
|
test_module_report_xlsx_helper:
|
||
|
stage: testsingle
|
||
|
when: on_failure
|
||
|
image:
|
||
|
name: registry.gitlab.com/jamotion/flectra/ubuntudev:2-latest
|
||
|
entrypoint: ["/bin/sh", "-c"]
|
||
|
script:
|
||
|
- apt-get install -y p7zip-full
|
||
|
- apt install -y expect-dev
|
||
|
- pip3 install -r ${CI_PROJECT_DIR}/requirements.txt
|
||
|
- su - flectra -c "mkdir ~/others"
|
||
|
- 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
|
||
|
- mkdir ${CI_PROJECT_DIR}/ci_data
|
||
|
- wget -O ${CI_PROJECT_DIR}/ci_data/test_base.zip https://gitlab.com/flectra-community/devops/oca2fc/raw/master/ci_data/test_base.zip
|
||
|
- 7z x -o ${CI_PROJECT_DIR}/ci_data/ ${CI_PROJECT_DIR}/ci_data/test_base.zip
|
||
|
- export PGPASSWORD="flectra"
|
||
|
- createdb -h psql -U flectra -O flectra -T template1 test_report_xlsx_helper
|
||
|
- psql -h psql -U flectra -d test_report_xlsx_helper -f ${CI_PROJECT_DIR}/ci_data/dump.sql
|
||
|
- su - flectra -c "mkdir -p ~/.local/share/filestore"
|
||
|
- mv ${CI_PROJECT_DIR}/ci_data/filestore /opt/flectra/.local/share/filestore/test_report_xlsx_helper
|
||
|
- chown -R flectra.flectra /opt/flectra/.local/share/filestore/test_report_xlsx_helper
|
||
|
- su - flectra -c "/opt/flectra/flectra-bin
|
||
|
--addons-path ${CI_PROJECT_DIR}
|
||
|
--db_host psql
|
||
|
--db_port 5432
|
||
|
--db_user flectra
|
||
|
--db_password flectra
|
||
|
--database test_report_xlsx_helper
|
||
|
--test-enable -i report_xlsx_helper
|
||
|
--stop-after-init
|
||
|
--log-level error
|
||
|
--log-handler flectra.addons.report_xlsx_helper:TEST"
|
||
|
|
||
|
test_module_report_xlsx_helper_demo:
|
||
|
stage: testsingle
|
||
|
when: on_failure
|
||
|
image:
|
||
|
name: registry.gitlab.com/jamotion/flectra/ubuntudev:2-latest
|
||
|
entrypoint: ["/bin/sh", "-c"]
|
||
|
script:
|
||
|
- apt-get install -y p7zip-full
|
||
|
- apt install -y expect-dev
|
||
|
- pip3 install -r ${CI_PROJECT_DIR}/requirements.txt
|
||
|
- su - flectra -c "mkdir ~/others"
|
||
|
- 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
|
||
|
- mkdir ${CI_PROJECT_DIR}/ci_data
|
||
|
- wget -O ${CI_PROJECT_DIR}/ci_data/test_base.zip https://gitlab.com/flectra-community/devops/oca2fc/raw/master/ci_data/test_base.zip
|
||
|
- 7z x -o ${CI_PROJECT_DIR}/ci_data/ ${CI_PROJECT_DIR}/ci_data/test_base.zip
|
||
|
- export PGPASSWORD="flectra"
|
||
|
- createdb -h psql -U flectra -O flectra -T template1 test_report_xlsx_helper_demo
|
||
|
- psql -h psql -U flectra -d test_report_xlsx_helper_demo -f ${CI_PROJECT_DIR}/ci_data/dump.sql
|
||
|
- su - flectra -c "mkdir -p ~/.local/share/filestore"
|
||
|
- mv ${CI_PROJECT_DIR}/ci_data/filestore /opt/flectra/.local/share/filestore/test_report_xlsx_helper_demo
|
||
|
- chown -R flectra.flectra /opt/flectra/.local/share/filestore/test_report_xlsx_helper_demo
|
||
|
- su - flectra -c "/opt/flectra/flectra-bin
|
||
|
--addons-path ${CI_PROJECT_DIR}
|
||
|
--db_host psql
|
||
|
--db_port 5432
|
||
|
--db_user flectra
|
||
|
--db_password flectra
|
||
|
--database test_report_xlsx_helper_demo
|
||
|
--test-enable -i report_xlsx_helper_demo
|
||
|
--stop-after-init
|
||
|
--log-level error
|
||
|
--log-handler flectra.addons.report_xlsx_helper_demo:TEST"
|
||
|
|