forked from OCA/openupgradelib
-
Notifications
You must be signed in to change notification settings - Fork 0
/
.travis.yml
78 lines (72 loc) · 3.92 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
# Config file for automatic testing at travis-ci.org
language: python
sudo: false
python:
- "3.6" # But switching to 2.7 in the script
services:
- postgresql
addons:
apt:
packages:
- python-lxml # because pip installation is slow
- python-simplejson
- python-serial
- python-yaml
- python-passlib
- python-psycopg2
- python-werkzeug
- realpath
# command to run tests, e.g. python setup.py test
script:
- source ~/virtualenv/python2.7/bin/activate
- pip install -q -r requirements.txt
- export PYTHONPATH=~/build/OCA/openupgradelib:$PYTHONPATH
- coverage run setup.py test
- python setup.py install
# Run functional tests from 6.1 to 11.0
- set -e
- git clone https://github.com/oca/openupgrade --depth 1 --no-single-branch -b 6.1 ~/openupgrade
- cd ~/openupgrade
- pip install psycopg2-binary
- git reset --hard origin/8.0 # earliest version to include requirements
- egrep -v "(openupgradelib)|(psycopg2)" requirements.txt | pip install -q -r /dev/stdin
- createdb testdb
- git reset --hard origin/6.1
- ./openerp-server -d testdb -i openupgradelib_tests --addons-path addons,/home/travis/build/OCA/openupgradelib/tests/addons --stop-after-init
# Run the migration of the test addon in 6.1
- echo "UPDATE ir_module_module SET latest_version = '6.0.1.0.0' WHERE name = 'openupgradelib_tests'" | psql testdb
- ./openerp-server -d testdb -u openupgradelib_tests --addons-path addons,/home/travis/build/OCA/openupgradelib/tests/addons --stop-after-init
- echo "UPDATE ir_module_module SET demo = FALSE" | psql testdb
# 7.0 -> 8.0
- git reset --hard origin/7.0
- ./openerp-server -d testdb -u all --addons-path addons,/home/travis/build/OCA/openupgradelib/tests/addons --stop-after-init
# 7.0 -> 8.0
- git reset --hard origin/8.0
- ./openerp-server -d testdb -u all --addons-path addons,/home/travis/build/OCA/openupgradelib/tests/addons --stop-after-init
# 8.0 -> 9.0
- git reset --hard origin/9.0
- egrep -v "(openupgradelib)|(psycopg2)" requirements.txt | pip install -q -r /dev/stdin
- ./openerp-server -d testdb -u all --addons-path addons,/home/travis/build/OCA/openupgradelib/tests/addons --stop-after-init
# 9.0 -> 10.0
- git reset --hard origin/10.0
- egrep -v "(openupgradelib)|(psycopg2)" requirements.txt | pip install -q -r /dev/stdin
- ./odoo-bin -d testdb -u all --addons-path addons,/home/travis/build/OCA/openupgradelib/tests/addons --stop-after-init
# 10.0 -> 11.0 (switch to Python 3.6)
- source ~/virtualenv/python3.6/bin/activate
- pushd /home/travis/build/OCA/openupgradelib && python setup.py install && popd
- pip install psycopg2-binary
- git reset --hard origin/11.0
- egrep -v "(openupgradelib)|(psycopg2)" requirements.txt | pip install -q -r /dev/stdin
- flake8 ~/build/OCA/openupgradelib
- ./odoo-bin -d testdb -u all --addons-path addons,/home/travis/build/OCA/openupgradelib/tests/addons --stop-after-init
# Build docs
- pip install -q sphinx; sh ~/openupgrade/scripts/build_openupgrade_docs
after_success:
- coveralls
deploy:
provider: pypi
user: OCA
password:
secure: SY6C05pC8L34WESUeZTgi1B8isQox3IwFl1NX5fViDSYEGHLQNwbrzXIn9naUhbiJMIDn6zQuj5i6in7/GFcooWn764UzIMvY3ve2xKbIuGVIO6O8tdNm+zu6B582Ok7X7LzRPRRnmVn2NDEymmiZm/wKwRBXmIR2bIEEXdBEqXbqevsHCN2oVQZ+og68Gv0uj/W6oNyFCOZhB9ZB9sMqD12j40lSy5HKPdTb5n0ANdo3wnzCU6hU+Vpg91GXp6A5AXhxikeM9FMMnDR+tTleRFum86MvBl2Zke3mCrmCn2HQ7/kb8xWXk8rya8iKISFET+lD0XqbBnyqEVqjArMoxFXmAVEijonykdM2nm1ep6k/8bhrqej86S6bXktilv3AZ2B5apgUMqtRQDucfiSiZOvPqQXgpez3bgsAGlP/5A9VxLhSF1IdwZ/h5I3g4lMDb2E8H2IsXFtLmrLacVTDvWOkxga4AYtPwmX3IISZ1eQtE2iWdaz8ZC7Wf+S5ItS/i6ssjOvPRA+zA8+fkFOHJg9QvpYD9noZpfYbQZCm7qqcK/cO+0HwZp2VEQgnOYq4F5uwWCS7EYfvfNqGARRRxS3MEhsc9XuqS/lSFwgJvyp//VDykbQ2fTiQ4SQFtNWQmMxJNgNLMlGUOdymnlJW2IdIYk+2PSAfxr+S+XS2Pc=
on:
tags: true