-
Notifications
You must be signed in to change notification settings - Fork 94
/
Copy path.travis.yml.jinja
86 lines (79 loc) · 2.28 KB
/
.travis.yml.jinja
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
language: python
cache:
directories:
- $HOME/.cache/pip
- $HOME/.cache/pre-commit
python:
{#- Pin the lowest supported version for each Odoo release #}
- "3.6"
addons:
{#- Pin the lowest supported version for each Odoo release #}
postgresql: "9.6"
apt:
{%- if travis_apt_sources %}
sources:
{%- for source in travis_apt_sources %}
- {{ source|tojson }}
{%- endfor %}
{%- endif %}
packages:
- expect-dev # provides unbuffer utility
{%- for package in travis_apt_packages %}
- {{ package|tojson }}
{%- endfor %}
stages:
- linting
- test
jobs:
include:
- stage: linting
name: "pre-commit"
install: pip install pre-commit
script: pre-commit run --all --show-diff-on-failure --verbose --color always
after_success:
before_install:
{%- if rebel_module_groups %}
{#- If there are rebel modules, we need separated test jobs and .pot generations #}
{%- for group in rebel_module_groups %}
# Test separately: {{ group }}
- stage: test
env:
- TESTS=1 ODOO_REPO="odoo/odoo" MAKEPOT=1 INCLUDE="{{ group }}"
- stage: test
env:
- TESTS=1 ODOO_REPO="OCA/OCB" INCLUDE="{{ group }}"
{%- endfor %}
# Test all other addons together
- stage: test
env:
- TESTS=1 ODOO_REPO="odoo/odoo" EXCLUDE="{{ rebel_module_groups|join(',') }}"
- stage: test
env:
- TESTS=1 ODOO_REPO="OCA/OCB" EXCLUDE="{{ rebel_module_groups|join(',') }}"
{%- else %}
{#- If all modules can get along, we test and generate .pot all at once #}
- stage: test
env:
- TESTS=1 ODOO_REPO="odoo/odoo" MAKEPOT="1"
- stage: test
env:
- TESTS=1 ODOO_REPO="OCA/OCB"
{%- endif %}
env:
global:
- VERSION="{{ odoo_version }}" TESTS="0" LINT_CHECK="0" MAKEPOT="0"
{%- if include_wkhtmltopdf %}
- WKHTMLTOPDF_VERSION="0.12.5"
{%- endif %}
{%- if dependency_installation_mode == "PIP" %}
- MQT_DEP=PIP
{%- endif %}
install:
- git clone --depth=1 https://github.com/OCA/maintainer-quality-tools.git
${HOME}/maintainer-quality-tools
- export PATH=${HOME}/maintainer-quality-tools/travis:${PATH}
- travis_install_nightly
script:
- travis_run_tests
after_success:
- travis_after_tests_success