forked from qrtl/qrtl-custom
-
Notifications
You must be signed in to change notification settings - Fork 0
/
.travis.yml
111 lines (102 loc) · 4.08 KB
/
.travis.yml
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
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
language: python
cache:
directories:
- $HOME/.cache/pip
# Add cache for pre-commit on repo that uses it (mandatory for >= 13)
- $HOME/.cache/pre-commit
python:
# For branches <= 10.0, put `- "2.7.13"`
# For branches 11.0 and 12.0, put `- "3.5"`
- "3.6"
addons:
# By default postgresql-9.1 is installed but there is issue related:
# https://github.com/OCA/maintainer-quality-tools/issues/432#issuecomment-281580935
# Better use higher PostgreSQL version
postgresql: "9.6"
apt:
# sources:
# Search your sources alias here:
# https://github.com/travis-ci/apt-source-whitelist/blob/master/ubuntu.json
packages:
- expect-dev # provides unbuffer utility
# Search your packages here:
# https://github.com/travis-ci/apt-package-whitelist/blob/master/ubuntu-precise
# For wkhtmltopdf, see the env section below
# Sometimes complicated website repos need Compass & SaSS:
before_install:
# - rvm install ruby --latest
# - gem install bootstrap-sass
# - gem install compass --pre
# Login to github with Quartile account
- echo -e "machine github.com\n login $CI_USER_TOKEN" > ~/.netrc
stages:
- linting
- install
- test
jobs:
include:
# use this linting job repos that use pre-commit (mandatory for >= 13)
- stage: linting
name: "pre-commit"
python: "3.6" # Black requires python >= 3.6
install: pip install pre-commit
script: pre-commit run --all --show-diff-on-failure --verbose --color always
after_success:
before_install:
# use this linting job for repos that do not use pre-commit (default for < 13)
# QRTL: Since we use pre-commit, the original linting can be omitted (it includes
# checking the authors must contain OCA)
# - stage: linting
# env:
# - LINT_CHECK="1"
- stage: test
env:
# add MAKEPOT="1" to a TEST line to export .pot files from
# the test database after test success
- TESTS="1" ODOO_REPO="odoo/odoo" MAKEPOT="1"
- stage: test
env:
- TESTS="1" ODOO_REPO="OCA/OCB"
# Other env possibilities:
# use this to install a standalone database to export .pot files
# - MAKEPOT="1"
# either use the two lines above or the two below. Don't change the default if
# it's not necessary (it is only necessary if modules in your repository can't
# be installed in the same database. And you get a huge speed penalty in your
# tests)
# - TESTS="1.0" ODOO_REPO="odoo/odoo" UNIT_TEST="1"
# - TESTS="1.0" ODOO_REPO="OCA/OCB" UNIT_TEST="1"
# QRTL: Add following tests the installation of all modules including those are excluded
- stage: install
env:
- TESTS="1" ODOO_REPO="odoo/odoo" MAKEPOT="1" TEST_ENABLE="0" EXCLUDE=""
- stage: install
env:
- TESTS="1" ODOO_REPO="OCA/OCB" TEST_ENABLE="0" EXCLUDE=""
env:
global:
- VERSION="12.0" TESTS="0" LINT_CHECK="0" MAKEPOT="0"
# Set this variable to some version existing as linux-generic build on
# https://github.com/wkhtmltopdf/wkhtmltopdf/releases
# if you need to install wkhtmltopdf
# - WKHTMLTOPDF_VERSION="0.12.5"
# Set the above to install a `wkhtmltopdf` version that is not the one provided
# by the `pov-wkhtmltopdf` repo.
- PHANTOMJS_VERSION="latest"
# The above line controls the PhantomJS version that is used for JS testing.
# It is not necessary to include this value unless you are altering the default.
# Use `OS` to skip the PhantomJS upgrade & use the system version instead.
- WEBSITE_REPO="1"
# Use the above line to install dependencies that are required for website repos:
# * SASS & Bootstrap-SASS
# * Compass
- EXCLUDE="partner_category_hierarchy,website_forum_visibility"
# Exclude modules that do not maintained by QRTL and failed the unit-tests in the module
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