forked from buildbot/buildbot
-
Notifications
You must be signed in to change notification settings - Fork 0
/
.travis.yml
73 lines (59 loc) · 2.14 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
# Travis CI configuration file
# http://about.travis-ci.org/docs/
dist: precise
addons:
postgresql: "9.4"
apt_packages:
- enchant
- aspell
- aspell-en
- ispell
- iamerican
services:
- mysql
- postgresql
language: python
# Available Python versions:
# http://about.travis-ci.org/docs/user/ci-environment/#Python-VM-images
python:
- "2.7"
env:
# we now use travis only for real database testing
# travis containers do have much more optimized db installations
- TWISTED=latest SQLALCHEMY=latest TESTS=coverage BUILDBOT_TEST_DB_URL=mysql+mysqldb://[email protected]/bbtest?storage_engine=InnoDB
# Configuration that runs tests with real PostgreSQL database with pg8000 and psycopg2 drivers
- TWISTED=latest SQLALCHEMY=latest TESTS=coverage BUILDBOT_TEST_DB_URL=postgresql+psycopg2:///bbtest?user=postgres
- TWISTED=latest SQLALCHEMY=latest TESTS=coverage BUILDBOT_TEST_DB_URL=postgresql+pg8000:///bbtest?user=postgres
# Dependencies installation commands
install:
- pip install -U pip
- pip install -r requirements-ci.txt
- pip install -r requirements-cidb.txt
- "if [ $TWISTED = trunk ]; then pip install git+https://github.com/twisted/twisted ; fi"
- "if [ $TWISTED != latest -a $TWISTED != trunk ]; then pip install Twisted==$TWISTED ; fi"
- "if [ $SQLALCHEMY != latest ]; then pip install sqlalchemy==$SQLALCHEMY; fi"
before_script:
# create real MySQL database for tests
- mysql -e 'create database bbtest;'
# create real PostgreSQL database for tests
- psql -c 'create database bbtest;' -U postgres
# Tests running commands
script:
# run real db tests under coverage to have several merging coverage report
# https://github.com/codecov/support/wiki/Merging-Reports
- "if [ $TESTS = coverage ]; then coverage run --rcfile=.coveragerc $(which trial) --reporter=text --rterrors buildbot.test buildbot_worker.test ; fi"
notifications:
email: false
after_success:
- "if [ $TESTS = coverage ]; then codecov ; fi"
after_script:
# List installed packages along with their versions.
- "pip list"
sudo: false
branches:
# Only build main-line branches.
only:
- master
- eight
git:
depth: 300