2021-03-12 16:20:48 +00:00
|
|
|
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
|
2021-11-14 03:10:44 +00:00
|
|
|
- pip3 install -r ${CI_PROJECT_DIR}/requirements.txt
|
2021-03-12 16:20:48 +00:00
|
|
|
- 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
|
2023-05-19 08:19:18 +00:00
|
|
|
--addons-path ${CI_PROJECT_DIR}
|
2021-03-12 16:20:48 +00:00
|
|
|
--db_host psql
|
|
|
|
--db_port 5432
|
|
|
|
--db_user flectra
|
|
|
|
--db_password flectra
|
|
|
|
--database test_all
|
|
|
|
--test-enable
|
2023-05-19 08:19:18 +00:00
|
|
|
--init partner_statement,account_move_line_report_xls,mis_template_financial_report,account_tax_balance,account_financial_report,mis_builder_cash_flow
|
2021-03-12 16:20:48 +00:00
|
|
|
--stop-after-init
|
|
|
|
--log-level error
|
2023-05-19 08:19:18 +00:00
|
|
|
--log-handler flectra.addons.partner_statement:TEST
|
2021-10-17 02:10:41 +00:00
|
|
|
--log-handler flectra.addons.account_move_line_report_xls:TEST
|
2022-06-29 18:32:21 +00:00
|
|
|
--log-handler flectra.addons.mis_template_financial_report:TEST
|
2023-05-19 08:19:18 +00:00
|
|
|
--log-handler flectra.addons.account_tax_balance:TEST
|
|
|
|
--log-handler flectra.addons.account_financial_report:TEST
|
2021-10-24 02:10:29 +00:00
|
|
|
--log-handler flectra.addons.mis_builder_cash_flow:TEST
|
2021-03-12 16:20:48 +00:00
|
|
|
"
|
|
|
|
|
|
|
|
|
2023-05-19 08:19:18 +00:00
|
|
|
test_module_partner_statement:
|
2021-12-05 03:11:43 +00:00
|
|
|
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
|
|
|
|
- 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"
|
2023-05-19 08:19:18 +00:00
|
|
|
- createdb -h psql -U flectra -O flectra -T template1 test_partner_statement
|
|
|
|
- psql -h psql -U flectra -d test_partner_statement -f ${CI_PROJECT_DIR}/ci_data/dump.sql
|
2021-12-05 03:11:43 +00:00
|
|
|
- su - flectra -c "mkdir -p ~/.local/share/filestore"
|
2023-05-19 08:19:18 +00:00
|
|
|
- mv ${CI_PROJECT_DIR}/ci_data/filestore /opt/flectra/.local/share/filestore/test_partner_statement
|
|
|
|
- chown -R flectra.flectra /opt/flectra/.local/share/filestore/test_partner_statement
|
2021-12-05 03:11:43 +00:00
|
|
|
- su - flectra -c "/opt/flectra/flectra-bin
|
2023-05-19 08:19:18 +00:00
|
|
|
--addons-path ${CI_PROJECT_DIR}
|
2021-12-05 03:11:43 +00:00
|
|
|
--db_host psql
|
|
|
|
--db_port 5432
|
|
|
|
--db_user flectra
|
|
|
|
--db_password flectra
|
2023-05-19 08:19:18 +00:00
|
|
|
--database test_partner_statement
|
|
|
|
--test-enable -i partner_statement
|
2021-12-05 03:11:43 +00:00
|
|
|
--stop-after-init
|
|
|
|
--log-level error
|
2023-05-19 08:19:18 +00:00
|
|
|
--log-handler flectra.addons.partner_statement:TEST"
|
2021-12-05 03:11:43 +00:00
|
|
|
|
2021-10-17 02:10:41 +00:00
|
|
|
test_module_account_move_line_report_xls:
|
|
|
|
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
|
2021-11-14 03:10:44 +00:00
|
|
|
- pip3 install -r ${CI_PROJECT_DIR}/requirements.txt
|
2021-10-17 02:10:41 +00:00
|
|
|
- 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_account_move_line_report_xls
|
|
|
|
- psql -h psql -U flectra -d test_account_move_line_report_xls -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_account_move_line_report_xls
|
|
|
|
- chown -R flectra.flectra /opt/flectra/.local/share/filestore/test_account_move_line_report_xls
|
|
|
|
- su - flectra -c "/opt/flectra/flectra-bin
|
2023-05-19 08:19:18 +00:00
|
|
|
--addons-path ${CI_PROJECT_DIR}
|
2021-10-17 02:10:41 +00:00
|
|
|
--db_host psql
|
|
|
|
--db_port 5432
|
|
|
|
--db_user flectra
|
|
|
|
--db_password flectra
|
|
|
|
--database test_account_move_line_report_xls
|
|
|
|
--test-enable -i account_move_line_report_xls
|
|
|
|
--stop-after-init
|
|
|
|
--log-level error
|
|
|
|
--log-handler flectra.addons.account_move_line_report_xls:TEST"
|
|
|
|
|
2023-05-19 08:19:18 +00:00
|
|
|
test_module_mis_template_financial_report:
|
2021-03-12 16:20:48 +00:00
|
|
|
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
|
2021-11-14 03:10:44 +00:00
|
|
|
- pip3 install -r ${CI_PROJECT_DIR}/requirements.txt
|
2021-03-12 16:20:48 +00:00
|
|
|
- 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"
|
2023-05-19 08:19:18 +00:00
|
|
|
- createdb -h psql -U flectra -O flectra -T template1 test_mis_template_financial_report
|
|
|
|
- psql -h psql -U flectra -d test_mis_template_financial_report -f ${CI_PROJECT_DIR}/ci_data/dump.sql
|
2021-03-12 16:20:48 +00:00
|
|
|
- su - flectra -c "mkdir -p ~/.local/share/filestore"
|
2023-05-19 08:19:18 +00:00
|
|
|
- mv ${CI_PROJECT_DIR}/ci_data/filestore /opt/flectra/.local/share/filestore/test_mis_template_financial_report
|
|
|
|
- chown -R flectra.flectra /opt/flectra/.local/share/filestore/test_mis_template_financial_report
|
2021-03-12 16:20:48 +00:00
|
|
|
- su - flectra -c "/opt/flectra/flectra-bin
|
2023-05-19 08:19:18 +00:00
|
|
|
--addons-path ${CI_PROJECT_DIR}
|
2021-03-12 16:20:48 +00:00
|
|
|
--db_host psql
|
|
|
|
--db_port 5432
|
|
|
|
--db_user flectra
|
|
|
|
--db_password flectra
|
2023-05-19 08:19:18 +00:00
|
|
|
--database test_mis_template_financial_report
|
|
|
|
--test-enable -i mis_template_financial_report
|
2021-03-12 16:20:48 +00:00
|
|
|
--stop-after-init
|
|
|
|
--log-level error
|
2023-05-19 08:19:18 +00:00
|
|
|
--log-handler flectra.addons.mis_template_financial_report:TEST"
|
2021-03-12 16:20:48 +00:00
|
|
|
|
2023-05-19 08:19:18 +00:00
|
|
|
test_module_account_tax_balance:
|
2021-03-12 16:20:48 +00:00
|
|
|
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
|
2021-11-14 03:10:44 +00:00
|
|
|
- pip3 install -r ${CI_PROJECT_DIR}/requirements.txt
|
2021-03-12 16:20:48 +00:00
|
|
|
- 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"
|
2023-05-19 08:19:18 +00:00
|
|
|
- createdb -h psql -U flectra -O flectra -T template1 test_account_tax_balance
|
|
|
|
- psql -h psql -U flectra -d test_account_tax_balance -f ${CI_PROJECT_DIR}/ci_data/dump.sql
|
2021-03-12 16:20:48 +00:00
|
|
|
- su - flectra -c "mkdir -p ~/.local/share/filestore"
|
2023-05-19 08:19:18 +00:00
|
|
|
- mv ${CI_PROJECT_DIR}/ci_data/filestore /opt/flectra/.local/share/filestore/test_account_tax_balance
|
|
|
|
- chown -R flectra.flectra /opt/flectra/.local/share/filestore/test_account_tax_balance
|
2021-03-12 16:20:48 +00:00
|
|
|
- su - flectra -c "/opt/flectra/flectra-bin
|
2023-05-19 08:19:18 +00:00
|
|
|
--addons-path ${CI_PROJECT_DIR}
|
2021-03-12 16:20:48 +00:00
|
|
|
--db_host psql
|
|
|
|
--db_port 5432
|
|
|
|
--db_user flectra
|
|
|
|
--db_password flectra
|
2023-05-19 08:19:18 +00:00
|
|
|
--database test_account_tax_balance
|
|
|
|
--test-enable -i account_tax_balance
|
2021-03-12 16:20:48 +00:00
|
|
|
--stop-after-init
|
|
|
|
--log-level error
|
2023-05-19 08:19:18 +00:00
|
|
|
--log-handler flectra.addons.account_tax_balance:TEST"
|
2021-03-12 16:20:48 +00:00
|
|
|
|
2023-05-19 08:19:18 +00:00
|
|
|
test_module_account_financial_report:
|
2021-10-24 02:10:29 +00:00
|
|
|
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
|
2021-11-14 03:10:44 +00:00
|
|
|
- pip3 install -r ${CI_PROJECT_DIR}/requirements.txt
|
2021-10-24 02:10:29 +00:00
|
|
|
- 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"
|
2023-05-19 08:19:18 +00:00
|
|
|
- createdb -h psql -U flectra -O flectra -T template1 test_account_financial_report
|
|
|
|
- psql -h psql -U flectra -d test_account_financial_report -f ${CI_PROJECT_DIR}/ci_data/dump.sql
|
2021-10-24 02:10:29 +00:00
|
|
|
- su - flectra -c "mkdir -p ~/.local/share/filestore"
|
2023-05-19 08:19:18 +00:00
|
|
|
- mv ${CI_PROJECT_DIR}/ci_data/filestore /opt/flectra/.local/share/filestore/test_account_financial_report
|
|
|
|
- chown -R flectra.flectra /opt/flectra/.local/share/filestore/test_account_financial_report
|
2021-10-24 02:10:29 +00:00
|
|
|
- su - flectra -c "/opt/flectra/flectra-bin
|
2023-05-19 08:19:18 +00:00
|
|
|
--addons-path ${CI_PROJECT_DIR}
|
2021-10-24 02:10:29 +00:00
|
|
|
--db_host psql
|
|
|
|
--db_port 5432
|
|
|
|
--db_user flectra
|
|
|
|
--db_password flectra
|
2023-05-19 08:19:18 +00:00
|
|
|
--database test_account_financial_report
|
|
|
|
--test-enable -i account_financial_report
|
2021-10-24 02:10:29 +00:00
|
|
|
--stop-after-init
|
|
|
|
--log-level error
|
2023-05-19 08:19:18 +00:00
|
|
|
--log-handler flectra.addons.account_financial_report:TEST"
|
2021-10-24 02:10:29 +00:00
|
|
|
|
2023-05-19 08:19:18 +00:00
|
|
|
test_module_mis_builder_cash_flow:
|
2021-11-14 03:10:44 +00:00
|
|
|
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
|
|
|
|
- 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"
|
2023-05-19 08:19:18 +00:00
|
|
|
- createdb -h psql -U flectra -O flectra -T template1 test_mis_builder_cash_flow
|
|
|
|
- psql -h psql -U flectra -d test_mis_builder_cash_flow -f ${CI_PROJECT_DIR}/ci_data/dump.sql
|
2021-11-14 03:10:44 +00:00
|
|
|
- su - flectra -c "mkdir -p ~/.local/share/filestore"
|
2023-05-19 08:19:18 +00:00
|
|
|
- mv ${CI_PROJECT_DIR}/ci_data/filestore /opt/flectra/.local/share/filestore/test_mis_builder_cash_flow
|
|
|
|
- chown -R flectra.flectra /opt/flectra/.local/share/filestore/test_mis_builder_cash_flow
|
2021-11-14 03:10:44 +00:00
|
|
|
- su - flectra -c "/opt/flectra/flectra-bin
|
2023-05-19 08:19:18 +00:00
|
|
|
--addons-path ${CI_PROJECT_DIR}
|
2021-11-14 03:10:44 +00:00
|
|
|
--db_host psql
|
|
|
|
--db_port 5432
|
|
|
|
--db_user flectra
|
|
|
|
--db_password flectra
|
2023-05-19 08:19:18 +00:00
|
|
|
--database test_mis_builder_cash_flow
|
|
|
|
--test-enable -i mis_builder_cash_flow
|
2021-11-14 03:10:44 +00:00
|
|
|
--stop-after-init
|
|
|
|
--log-level error
|
2023-05-19 08:19:18 +00:00
|
|
|
--log-handler flectra.addons.mis_builder_cash_flow:TEST"
|
2021-11-14 03:10:44 +00:00
|
|
|
|