Skip to content

Commit 5518ff3

Browse files
authored
Merge pull request metacpan#747 from metacpan/oalders/travis-take-two
Improve Travis CI config
2 parents 7ebf560 + d920095 commit 5518ff3

File tree

1 file changed

+17
-14
lines changed

1 file changed

+17
-14
lines changed

.travis.yml

Lines changed: 17 additions & 14 deletions
Original file line numberDiff line numberDiff line change
@@ -18,29 +18,33 @@ env:
1818

1919
# Instantiate Catalyst models using metacpan_server_testing.conf
2020
- METACPAN_SERVER_CONFIG_LOCAL_SUFFIX=testing
21+
22+
- DEVEL_COVER_OPTIONS="-ignore,^local/"
23+
- PERL_CARTON_PATH=$TRAVIS_BUILD_DIR/local
2124
matrix:
22-
- USE_CPANFILE_SNAPSHOT=true
23-
- USE_CPANFILE_SNAPSHOT=false
25+
- CPAN_RESOLVER=metadb PERL_CARTON_PATH=$TRAVIS_BUILD_DIR/no-snapshot HARNESS_VERBOSE=1
26+
- CPAN_RESOLVER=snapshot
2427

2528
matrix:
2629
allow_failures:
27-
- env: USE_CPANFILE_SNAPSHOT=false
28-
29-
# libgmp-dev required by Net::OpenID::Consumer
30-
# postgresql-server-dev-all is required by DBD::Pg
30+
- env: CPAN_RESOLVER=metadb PERL_CARTON_PATH=$TRAVIS_BUILD_DIR/no-snapshot HARNESS_VERBOSE=1
31+
fast_finish: true
3132

3233
addons:
3334
apt:
3435
packages:
36+
# libgmp-dev required by Net::OpenID::Consumer
3537
- libgmp-dev
38+
# postgresql-server-dev-all is required by DBD::Pg
3639
- postgresql-server-dev-all
3740

3841
before_install:
39-
- sudo service elasticsearch stop && curl -O -L https://download.elasticsearch.org/elasticsearch/elasticsearch/elasticsearch-2.4.3.deb && sudo dpkg -i --force-confnew elasticsearch-2.4.3.deb && sudo service elasticsearch start
42+
- git clone git://github.com/travis-perl/helpers ~/travis-perl-helpers
43+
- source ~/travis-perl-helpers/init
4044

45+
- sudo service elasticsearch stop && curl -O -L https://download.elasticsearch.org/elasticsearch/elasticsearch/elasticsearch-2.4.3.deb && sudo dpkg -i --force-confnew elasticsearch-2.4.3.deb && sudo service elasticsearch start
4146
- sudo service elasticsearch restart
4247

43-
#- cpanm -n Devel::Cover::Report::Coveralls
4448
- cpanm -n Carton
4549
- cpanm -n App::cpm
4650

@@ -49,19 +53,17 @@ before_install:
4953
- cpanm -n [email protected]
5054

5155
install:
52-
- 'cpm install `test "${USE_CPANFILE_SNAPSHOT}" = "false" && echo " --resolver metadb" || echo " --resolver snapshot"`'
56+
- cpm install -L $PERL_CARTON_PATH --resolver $CPAN_RESOLVER --workers $(test-jobs)
5357

5458
before_script:
5559
- "perl -i -pe 's/(servers :)9900/localhost:9200/' metacpan_server_testing.conf"
60+
- coverage-setup
5661

5762
script:
58-
# Devel::Cover isn't in the cpanfile
59-
# but if it's installed into the global dirs this should work.
60-
#- HARNESS_PERL_SWITCHES=-MDevel::Cover=+ignore,local carton exec prove -It/lib -lr -j 2 t
61-
- carton exec prove -It/lib -lr -j 2 t
63+
- carton exec prove -It/lib -lr -j$(test-jobs) t
6264

6365
after_success:
64-
# - cover -report coveralls
66+
- coverage-report
6567

6668
#after_failure:
6769
# - cat ~/.cpanm/build.log
@@ -73,3 +75,4 @@ services:
7375
cache:
7476
directories:
7577
- local
78+
- ~/perl5

0 commit comments

Comments
 (0)