This repository has been archived by the owner on May 24, 2021. It is now read-only.
-
Notifications
You must be signed in to change notification settings - Fork 10
/
Copy path.travis.yml
80 lines (80 loc) · 3.67 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
language: python
dist: trusty
sudo: false
notifications:
slack:
rooms:
- secure: VYXNYJOU6DanVcFWQcG4oizrdeFGYdCWc8s/ZmTnBItlYnA3EOegIaY487LnD0FVSkxs6N93DMBvcAMCO4Lea9zVpRNPcWfTivZqj9Yo2VxuNSHxhYTl1HAlXBel+W31uRlvRcNxVvMReMy/+hzHa2gXFY6PnM4GuaveK0xk3TALQUOlNDzHZzNKOu2qR1gnKwyiSlfxbKpZDOOzMKgLbTPn+fvLFRcDWA5O7gwOGwa3jyi4FSh9isjhoZPd+vjrmrnl2mBDJGLQYgRb7qtPrQJFPXFLETeI3rIxhVzJ0KAMQHvPOOgYmuUPmEP/NySH0QvnwY+oZloor8WzESC+viaOjlB1lfNr7koCZwsw53L7cIVmLhUrP1oVUwWlG5kjEzSfMNt2D0P0CluN+3PEupV7gDWfz6mHZyID9AVCPbge/kBVbtNAniu8XT6hvq7zaLs+5NJfKD1maEea9IOYgJNJ9rl9iPM9YSWSeVI36eshbQJYcAxlSN4aNu6hAotg978j3J5q151uCTzoRayT0E7PswAzuMIULryVq/gZiecHTy2IfHuhEsY4+YLdGiRSCeVRrdhIGK659awWcqAM4ND4T1ZRm6LKZ+DNFc6qrNkRb+dxGO13GsnGJFmJRxvzDmAvY9yXW4MX7Mrk6Ky0fyQCUCp/5x/X0uHOaCcKk2c=
on_success: change
on_failure: always
cache:
apt: true
directories:
- "$HOME/.cache/pip"
python:
- '2.7'
addons:
apt:
packages:
- expect-dev
# TODO Investigate if this is needed. Stopped working in Travis so we
# added a pip install line for it, but may be used elsewhere in the stack.
- python-lxml
- python-simplejson
- python-serial
- python-yaml
- sshpass
postgresql: '9.3'
env:
global:
- VERSION="8.0" RUN_PIPELINE="0" TESTS="0" LINT_CHECK="0" TRANSIFEX="0" OPTIONS="--test-report-directory=${HOME}/tests"
EXCLUDE="xml_test_output" PYLINT_PR_CONFIG_FILE="travis_run_pylint.cfg"
matrix:
- LINT_CHECK="1"
- ODOO_REPO="bjss/odoo" RUN_PIPELINE="1" TESTS="1" INCLUDE="nh_odoo_fixes,nh_activity,nh_clinical,nh_clinical_ldap"
VERSION="liveobs_1.11.1"
virtualenv:
system_site_packages: true
before_install:
- git clone --depth=50 https://github.com/Gimpneek/odoo_xml_test_output.git odoo_xml_test_output
- cd odoo_xml_test_output
- pip install -r requirements.txt
- mkdir -p ${HOME}/dependencies
- mv xml_test_output ${HOME}/dependencies/xml_test_output
- cd ${TRAVIS_BUILD_DIR}
install:
- pip install --upgrade pip
- pip install -r requirements.txt
# Install a pinned version of the Pillow so when OCA's requirements.txt is installed the dependency at this particular version is met
- pip install Pillow==2.5.1
- pip install lxml==3.8.0
- pip install python-ldap==2.4.19
- git clone --depth=1 https://github.com/NeovaHealth/maintainer-quality-tools.git
${HOME}/maintainer-quality-tools
- pip install -r ${HOME}/maintainer-quality-tools/requirements.txt
- export PATH=${HOME}/maintainer-quality-tools/travis:${PATH}
- travis_install_nightly
before_script:
- npm install -g gulp-cli
script:
- travis_run_tests
after_script:
- coverage xml -o ${HOME}/build/NeovaHealth/nhclinical/coverage.xml
- ls ${HOME}/build/NeovaHealth/nhclinical
- cd ${HOME}/build/NeovaHealth/nhclinical
- pip install codacy-coverage
- python-codacy-coverage -r coverage.xml
- echo "<?xml version=\"1.0\" encoding=\"utf-8\"?><testsuites>" > test_report.xml
- for rep in ${HOME}/tests/*.xml; do cat "$rep" | grep -v "<?xml " >> test_report.xml;
done
- echo "</testsuites>" >> test_report.xml
- echo "Test result is ${TRAVIS_TEST_RESULT}"
- echo "Pipeline status is ${RUN_PIPELINE}"
- echo "${TRAVIS_REPO_SLUG} ${TRAVIS_BUILD_NUMBER} ${TRAVIS_BRANCH} ${TRAVIS_COMMIT}"
>> test_file.xml
- printf '{"branch":"%s","commit":"%s","pull_request":"%s","repository":{"name":"%s"}}'
"$TRAVIS_BRANCH" "$TRAVIS_COMMIT" "$TRAVIS_PULL_REQUEST" "$TRAVIS_REPO_SLUG" > json.file
- if [ "$TRAVIS_TEST_RESULT" == "0" -a "$RUN_PIPELINE" == "1" ]; then curl -v ${TARGET_URL}
-F json_file=@./json.file -F coverage_file=@./coverage.xml -F test_report_file=@./test_report.xml
-F json='{"parameter":[{"name":"json_payload","file":"json_file"}, {"name":"test_report","file":"test_report_file"},
{"name":"coverage_report","file":"coverage_file"}]}'; fi