Use Travis Perl helper script
[bioperl-live.git] / .travis.yml
blob8bf3be3ece22435488188f5dc22def638d57fbc7
1 language: perl
2 perl:
3   - "5.24"
4   - "5.20"
5   - "5.18"
6   - "5.16"
7   - "5.14"
9 matrix:
10   include:
11     - perl: 5.18
12       env: COVERAGE=1   # enables coverage+coveralls reporting
14 sudo: false
15 env:
16   global:
17     - PERL_CPANM_OPT="--notest --force --skip-satisfied"
18     - BIOPERL_NETWORK_TESTING=0   # disables the network tests
20 addons:
21   apt:
22     packages:
23       - libdb-dev
24       - graphviz
25       - libgd2-xpm-dev
26       - libxml2-dev
28 before_install:
29   - git clone git://github.com/travis-perl/helpers ~/travis-perl-helpers
30   - source ~/travis-perl-helpers/init
31   - build-perl
32   - perl -V
33   - cpanm DBD::mysql DBD::Pg DBD::SQLite 2>&1 | tail -n 1
34   - cpanm Test::Pod 2>&1 | tail -n 1
35   - cpanm Bio::ASN1::EntrezGene 2>&1 | tail -n 1
36   - if [ "$BIOPERL_NETWORK_TESTING" = "1" ]; then
37       export TRAVIS_AUTHOR_TESTING=1;
38       export TRAVIS_RELEASE_TESTING=1;
39       cpanm LWP::UserAgent LWP::Protocol::https 2>&1 | tail -n 1;
40     fi
41   - build-dist
42   - cd $BUILD_DIR
43 install:
44   - cpan-install --deps
45   - cpan-install --coverage
46 before_script:
47   - coverage-setup
48 script:
49   - export AUTHOR_TESTING=${TRAVIS_AUTHOR_TESTING:=0}
50   - export RELEASE_TESTING=${TRAVIS_RELEASE_TESTING:=0}
51   - prove -l -j$(test-jobs) $(test-files)
52 after_success:
53   - coverage-report
54   - ./travis_scripts/trigger-dockerhub.sh
56 #TODO - send emails to bioperl-guts-l
57 notifications:
58   email:
59     recipients:
60       - bioperl-guts-l@lists.open-bio.org
61       - cjfields1@gmail.com
62     on_success: change
63     on_failure: change
65 # whitelist branches
66 branches:
67   only:
68     - master
69     - /^release-[1-9]*-[0-9]*-[0-9]*$/