forked from OCA/maintainer-quality-tools
-
Notifications
You must be signed in to change notification settings - Fork 0
/
.travis.yml
54 lines (45 loc) · 2.38 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
# WARNING:
# Do not use this file as a template for you repository TravisCI configuration
# Instead use the files under the "/sample_files" directory for that purpose.
language: python
sudo: false
cache:
apt: true
directories:
- $HOME/.cache/pip
python:
- "2.7"
addons:
apt:
packages:
- expect-dev # provides unbuffer utility
- python-lxml # because pip installation is slow
virtualenv:
system_site_packages: true
env:
global:
- VERSION="9.0" TESTS="1" LINT_CHECK="0"
matrix:
- INSTANCE_ALIVE="1" INCLUDE="broken_module" SERVER_EXPECTED_ERRORS="2" # test errors are detected
- 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'
- INCLUDE="test_module,second_module" UNIT_TEST="1"
- VERSION="7.0" INCLUDE="test_module,second_module" ODOO_REPO="OCA/OCB" # ODOO_REPO usage example
- TESTS="1" INCLUDE="test_module,second_module" ODOO_REPO="OCA/OCB" MQT_TEMPLATE_DB='mqt_odoo_template_core' MQT_TEST_DB='mqt_odoo_core'
- VERSION="6.1" INCLUDE="test_module,second_module"
- LINT_CHECK="1" TESTS="0" PYLINT_EXPECTED_ERRORS="21" TRAVIS_PULL_REQUEST="false" # Use main pylint config file
- VERSION=master EXCLUDE="broken_no_access_rule" LINT_CHECK="1" TESTS="0" PYLINT_EXPECTED_ERRORS="26" TRAVIS_PULL_REQUEST="true" # Use PR pylint config file
- VERSION="7.0" LINT_CHECK="1" TESTS="0" PYLINT_EXPECTED_ERRORS="24" TRAVIS_PULL_REQUEST="true" # To check pylint_conf of PR's with old api
- VERSION="" LINT_CHECK="1" TESTS="0" PYLINT_EXPECTED_ERRORS="21" TRAVIS_PULL_REQUEST="false" # To check VERSION empty or unset case.
- INCLUDE="broken_no_access_rule" SERVER_EXPECTED_ERRORS="1" # test errors are detected
install:
- cp -r ../maintainer-quality-tools/ $HOME
- cp -r tests/test_repo/* ./
- export PATH=$HOME/maintainer-quality-tools/travis:$PATH
- travis_install_nightly 8.0 # only used if VERSION not set in env
- pip install coveralls # Force install coveralls in all cases of MQT for self_test script.
- git --git-dir=${TRAVIS_BUILD_DIR}/.git add --all # All modules moved are modules changed to test PR changes
script:
- coverage run --append ./travis/travis_run_tests 8.0 # only used if VERSION not set in env
- coverage run --append ./travis/self_tests
after_success:
- TESTS="1" LINT_CHECK="0" travis_after_tests_success