Skip to content
Snippets Groups Projects
.gitlab-ci.yml 989 B
Newer Older
variables:
  ODOO_POPULATE_MODEL: account.move
  ODOO_POPULATE_PREREQ: l10n_us
  ODOO_SCRIPTS_MODULE_LIST_TESTS: account,account_fiscal_year,account_period,date_range
arthur.mayer's avatar
arthur.mayer committed
  # those are account’s prerequisites, install them first to avoid running their tests
  ODOO_SCRIPTS_MODULE_LIST: base_setup,product,analytic,portal,digest
Vincent Hatakeyama's avatar
Vincent Hatakeyama committed
  - project: xcg/ci-templates
arthur.mayer's avatar
arthur.mayer committed
    file: /odoo/16.0/gitlab-ci.yaml

install-modules-with-demo:
  extends: .base-run
  script:
    - logfile=$(tempfile --suffix=.log)
    # install module
Vincent Hatakeyama's avatar
Vincent Hatakeyama committed
    - start --db_host=postgres --database odoo --max-cron-threads=0 --stop-after-init
      --init $CI_PROJECT_NAME $ADDONS_PATH --db_user=odoo $_TEST_OPTIONS $TEST_OPTIONS
      2>&1 | tee $logfile | sed -e 's/\(.*\) \(ERROR\) \(.*\)/\o033[2m\1\o033[22m
      \o033[31m\o033[7m\2\o033[27m \3\o033[0m/'
    - errors=$(grep " ERROR " "$logfile" -c || true)
    - |
      if [[ $errors -gt 0 ]]; then
        echo "$errors ERROR messages found"
        exit 1
      fi