Permalink
Browse files

add author test to check Changes log and run in Travis-CI

- This is to address <#67>.

  This allows for the Changes file to be parsed on MetaCPAN by
  <https://metacpan.org/pod/CPAN::Changes>.

- Travis-CI: install CPAN::Changes so that the author test runs.
  • Loading branch information...
1 parent df69b4e commit 64b8d1f62732081e7df86ed5aba5923e8f1fdecd @zmughal zmughal committed Mar 15, 2015
Showing with 21 additions and 0 deletions.
  1. +3 −0 .travis.yml
  2. +1 −0 MANIFEST.SKIP
  3. +17 −0 xt/00-check-changelog.t
View
@@ -53,14 +53,17 @@ before_install:
- perl -V
- cpanm --quiet --notest ExtUtils::F77 Term::ReadLine::Gnu PGPLOT # do not need tests
- cpanm --quiet --notest Devel::CheckLib # specify this now because this is a CONFIGURE_REQUIRES for author-side
+ - if [ "$AUTHOR_TESTING" == 1 ]; then cpanm --quiet --notest CPAN::Changes; fi # for author tests (AUTHOR_TESTING is set to true by default by init)
- cpanm --force --verbose ExtUtils::ParseXS # we install the latest ExtUtils::ParseXS
- if [ "$EUMM_BLEAD" == 1 ]; then cpanm --quiet --notest --dev ExtUtils::MakeMaker; fi
- build-dist
+ - SRC_DIR=$(pwd)
- cd $BUILD_DIR # $BUILD_DIR is set by the build-dist command
install:
- cpan-install --deps # installs prereqs, including recommends
- cpan-install --coverage # installs coverage prereqs, if enabled
- prove t/00-report-prereqs.t t/01-checkmanifest.t
+ - prove -b -v $SRC_DIR/xt/00-check-changelog.t # run the author test out of the source directory
# SYSTEM_CORES set by travis-perl-helpers
- if [ "$SERIAL_BUILD" == 1 ]; then make; else make -j$(( $SYSTEM_CORES * 2 )); fi
before_script:
View
@@ -244,6 +244,7 @@ pure_all
so_locations
subdirs
~$
+^xt/
.travis.yml
README.md
View
@@ -0,0 +1,17 @@
+use Test::More tests => 1;
+
+use strict;
+use warnings;
+
+use CPAN::Changes;
+use Data::Dumper;
+
+my $changes = CPAN::Changes->load('Changes');
+
+ok($changes);
+
+my @releases = map { +{ $_->version => $_->date } } $changes->releases;
+
+note Dumper \@releases;
+
+done_testing;

0 comments on commit 64b8d1f

Please sign in to comment.