mirror of
https://gitlab.com/flectra-community/mis-builder.git
synced 2024-12-23 12:51:46 +00:00
147 lines
6.3 KiB
YAML
147 lines
6.3 KiB
YAML
image: ubuntu:jammy
|
|
|
|
stages:
|
|
- testall
|
|
- testsingle
|
|
|
|
variables:
|
|
POSTGRES_DB: postgres
|
|
POSTGRES_USER: flectra
|
|
POSTGRES_PASSWORD: flectra
|
|
POSTGRES_HOST: postgres
|
|
POSTGRES_PORT: "5432"
|
|
|
|
services:
|
|
- name: postgres:14-bullseye
|
|
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
|
|
- 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 mis_builder_budget,mis_builder_demo,mis_builder
|
|
--stop-after-init
|
|
--log-level error
|
|
--log-handler flectra.addons.mis_builder_budget:TEST
|
|
--log-handler flectra.addons.mis_builder_demo:TEST
|
|
--log-handler flectra.addons.mis_builder:TEST
|
|
"
|
|
|
|
|
|
test_module_mis_builder_budget:
|
|
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
|
|
- 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_mis_builder_budget
|
|
- psql -h psql -U flectra -d test_mis_builder_budget -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_mis_builder_budget
|
|
- chown -R flectra.flectra /opt/flectra/.local/share/filestore/test_mis_builder_budget
|
|
- 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_mis_builder_budget
|
|
--test-enable -i mis_builder_budget
|
|
--stop-after-init
|
|
--log-level error
|
|
--log-handler flectra.addons.mis_builder_budget:TEST"
|
|
|
|
test_module_mis_builder_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
|
|
- 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_mis_builder_demo
|
|
- psql -h psql -U flectra -d test_mis_builder_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_mis_builder_demo
|
|
- chown -R flectra.flectra /opt/flectra/.local/share/filestore/test_mis_builder_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_mis_builder_demo
|
|
--test-enable -i mis_builder_demo
|
|
--stop-after-init
|
|
--log-level error
|
|
--log-handler flectra.addons.mis_builder_demo:TEST"
|
|
|
|
test_module_mis_builder:
|
|
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
|
|
- 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_mis_builder
|
|
- psql -h psql -U flectra -d test_mis_builder -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_mis_builder
|
|
- chown -R flectra.flectra /opt/flectra/.local/share/filestore/test_mis_builder
|
|
- 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_mis_builder
|
|
--test-enable -i mis_builder
|
|
--stop-after-init
|
|
--log-level error
|
|
--log-handler flectra.addons.mis_builder:TEST"
|
|
|