This repository has been archived by the owner on May 16, 2024. It is now read-only.
-
-
Notifications
You must be signed in to change notification settings - Fork 267
/
.travis.yml
87 lines (82 loc) · 3.3 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
# WARNING:
# Do not use this file as a template for you repository TravisCI configuration
# Instead use the template at https://github.com/OCA/oca-addons-repo-template
language: python
sudo: false
cache:
apt: true
directories:
- $HOME/.cache/pip
addons:
postgresql: "9.6"
apt:
packages:
- expect-dev # provides unbuffer utility
- python-lxml # because pip installation is slow
matrix:
include:
- python: 2.7
env:
VERSION="9.0" TESTS="1" LINT_CHECK="0"
INSTANCE_ALIVE="1" INCLUDE="broken_module" SERVER_EXPECTED_ERRORS="2" # test errors are detected
- python: 2.7
env:
VERSION="9.0" TESTS="1" LINT_CHECK="0"
EXCLUDE="broken_module,broken_lint,broken_no_access_rule" OPTIONS="--log-level=debug" INSTALL_OPTIONS="--log-level=info" RUN_COMMAND_MQT_CREATE_FOLDER='mkdir /tmp/tests'
- python: 2.7
env:
VERSION="9.0" TESTS="1" LINT_CHECK="0"
INCLUDE="test_module,second_module" UNIT_TEST="1"
- python: 2.7
env:
VERSION="9.0" TESTS="1" LINT_CHECK="0"
INCLUDE="test_module,second_module" ODOO_REPO="OCA/OCB" MQT_TEMPLATE_DB='mqt_odoo_template_core' MQT_TEST_DB='mqt_odoo_core'
- python: 2.7
env:
VERSION="" TESTS="0" LINT_CHECK="1"
PYLINT_EXPECTED_ERRORS="35"
- python: 3.5
env:
VERSION="" TESTS="0" LINT_CHECK="1"
PYLINT_EXPECTED_ERRORS="36"
- python: 3.7
env:
VERSION="" TESTS="0" LINT_CHECK="1"
PYLINT_EXPECTED_ERRORS="36"
- python: 3.5
env:
VERSION="11.0" ODOO_REPO="OCA/OCB" TESTS="1" LINT_CHECK="0"
INCLUDE="test_module,second_module"
- python: 3.7
env:
VERSION="11.0" ODOO_REPO="OCA/OCB" TESTS="1" LINT_CHECK="0"
INCLUDE="test_module,second_module"
- python: 3.5
env:
VERSION="12.0" ODOO_REPO="OCA/OCB" TESTS="1" LINT_CHECK="0"
INCLUDE="test_module,second_module"
SERVER_EXPECTED_ERRORS="1" # Supporting broken_uninstallable module after https://github.com/odoo/odoo/commit/c5d6a39
- python: 3.7
env:
VERSION="12.0" ODOO_REPO="OCA/OCB" TESTS="1" LINT_CHECK="0"
INCLUDE="test_module,second_module"
SERVER_EXPECTED_ERRORS="1" # Supporting broken_uninstallable module after https://github.com/odoo/odoo/commit/c5d6a39
install:
- cp -r ../maintainer-quality-tools/ $HOME
- cp -r tests/test_repo/* ./
- export PATH=$HOME/maintainer-quality-tools/travis:$PATH
# Fix AttributeError: 'str' object has no attribute 'name'
# https://stackoverflow.com/a/59549323/3753497
- pip install -U --force-reinstall pluggy
# Force install lint requirements in all cases of MQT for self_test script.
- pip install coverage
- LINT_CHECK="1" travis_install_nightly 8.0 # only used if VERSION not set in env
- git --git-dir=${TRAVIS_BUILD_DIR}/.git add --all # All modules moved are modules changed to test PR changes
script:
- TRAVIS_PULL_REQUEST="1" coverage run ./travis/travis_run_tests 8.0 # only used if VERSION not set in env
- coverage run --append ./travis/self_tests
after_success:
# Seudo-fix for codecov that is not processing "data_file" parameter
# More info about: https://github.com/codecov/codecov-python/issues/120
- cp ./.coverage_mqt ./.coverage
- TESTS="1" LINT_CHECK="0" travis_after_tests_success