mirror of
https://gitlab.com/flectra-community/account-closing.git
synced 2024-11-24 22:52:03 +00:00
283 lines
14 KiB
YAML
283 lines
14 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
|
|
- 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 account_invoice_start_end_dates,account_cutoff_start_end_dates,account_fiscal_year_closing,account_cutoff_base,account_cutoff_accrual_picking,account_multicurrency_revaluation,account_cutoff_accrual_subscription
|
|
--stop-after-init
|
|
--log-level error
|
|
--log-handler flectra.addons.account_invoice_start_end_dates:TEST
|
|
--log-handler flectra.addons.account_cutoff_start_end_dates:TEST
|
|
--log-handler flectra.addons.account_fiscal_year_closing:TEST
|
|
--log-handler flectra.addons.account_cutoff_base:TEST
|
|
--log-handler flectra.addons.account_cutoff_accrual_picking:TEST
|
|
--log-handler flectra.addons.account_multicurrency_revaluation:TEST
|
|
--log-handler flectra.addons.account_cutoff_accrual_subscription:TEST
|
|
"
|
|
|
|
|
|
test_module_account_invoice_start_end_dates:
|
|
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"
|
|
- createdb -h psql -U flectra -O flectra -T template1 test_account_invoice_start_end_dates
|
|
- psql -h psql -U flectra -d test_account_invoice_start_end_dates -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_invoice_start_end_dates
|
|
- chown -R flectra.flectra /opt/flectra/.local/share/filestore/test_account_invoice_start_end_dates
|
|
- 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_account_invoice_start_end_dates
|
|
--test-enable -i account_invoice_start_end_dates
|
|
--stop-after-init
|
|
--log-level error
|
|
--log-handler flectra.addons.account_invoice_start_end_dates:TEST"
|
|
|
|
test_module_account_cutoff_start_end_dates:
|
|
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"
|
|
- createdb -h psql -U flectra -O flectra -T template1 test_account_cutoff_start_end_dates
|
|
- psql -h psql -U flectra -d test_account_cutoff_start_end_dates -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_cutoff_start_end_dates
|
|
- chown -R flectra.flectra /opt/flectra/.local/share/filestore/test_account_cutoff_start_end_dates
|
|
- 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_account_cutoff_start_end_dates
|
|
--test-enable -i account_cutoff_start_end_dates
|
|
--stop-after-init
|
|
--log-level error
|
|
--log-handler flectra.addons.account_cutoff_start_end_dates:TEST"
|
|
|
|
test_module_account_fiscal_year_closing:
|
|
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"
|
|
- createdb -h psql -U flectra -O flectra -T template1 test_account_fiscal_year_closing
|
|
- psql -h psql -U flectra -d test_account_fiscal_year_closing -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_fiscal_year_closing
|
|
- chown -R flectra.flectra /opt/flectra/.local/share/filestore/test_account_fiscal_year_closing
|
|
- 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_account_fiscal_year_closing
|
|
--test-enable -i account_fiscal_year_closing
|
|
--stop-after-init
|
|
--log-level error
|
|
--log-handler flectra.addons.account_fiscal_year_closing:TEST"
|
|
|
|
test_module_account_cutoff_base:
|
|
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"
|
|
- createdb -h psql -U flectra -O flectra -T template1 test_account_cutoff_base
|
|
- psql -h psql -U flectra -d test_account_cutoff_base -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_cutoff_base
|
|
- chown -R flectra.flectra /opt/flectra/.local/share/filestore/test_account_cutoff_base
|
|
- 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_account_cutoff_base
|
|
--test-enable -i account_cutoff_base
|
|
--stop-after-init
|
|
--log-level error
|
|
--log-handler flectra.addons.account_cutoff_base:TEST"
|
|
|
|
test_module_account_cutoff_accrual_picking:
|
|
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"
|
|
- createdb -h psql -U flectra -O flectra -T template1 test_account_cutoff_accrual_picking
|
|
- psql -h psql -U flectra -d test_account_cutoff_accrual_picking -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_cutoff_accrual_picking
|
|
- chown -R flectra.flectra /opt/flectra/.local/share/filestore/test_account_cutoff_accrual_picking
|
|
- 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_account_cutoff_accrual_picking
|
|
--test-enable -i account_cutoff_accrual_picking
|
|
--stop-after-init
|
|
--log-level error
|
|
--log-handler flectra.addons.account_cutoff_accrual_picking:TEST"
|
|
|
|
test_module_account_multicurrency_revaluation:
|
|
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"
|
|
- createdb -h psql -U flectra -O flectra -T template1 test_account_multicurrency_revaluation
|
|
- psql -h psql -U flectra -d test_account_multicurrency_revaluation -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_multicurrency_revaluation
|
|
- chown -R flectra.flectra /opt/flectra/.local/share/filestore/test_account_multicurrency_revaluation
|
|
- 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_account_multicurrency_revaluation
|
|
--test-enable -i account_multicurrency_revaluation
|
|
--stop-after-init
|
|
--log-level error
|
|
--log-handler flectra.addons.account_multicurrency_revaluation:TEST"
|
|
|
|
test_module_account_cutoff_accrual_subscription:
|
|
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"
|
|
- createdb -h psql -U flectra -O flectra -T template1 test_account_cutoff_accrual_subscription
|
|
- psql -h psql -U flectra -d test_account_cutoff_accrual_subscription -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_cutoff_accrual_subscription
|
|
- chown -R flectra.flectra /opt/flectra/.local/share/filestore/test_account_cutoff_accrual_subscription
|
|
- 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_account_cutoff_accrual_subscription
|
|
--test-enable -i account_cutoff_accrual_subscription
|
|
--stop-after-init
|
|
--log-level error
|
|
--log-handler flectra.addons.account_cutoff_accrual_subscription:TEST"
|
|
|