From 8bf5f249d4db4d8f29fed8d533781297e9f0154e Mon Sep 17 00:00:00 2001 From: Zakariyya Mughal Date: Sun, 15 Mar 2015 17:25:25 -0500 Subject: [PATCH] add author test to check Changes log and run in Travis-CI - This is to address . This allows for the Changes file to be parsed on MetaCPAN by . - Travis-CI: install CPAN::Changes so that the author test runs. --- .travis.yml | 3 +++ MANIFEST.SKIP | 1 + xt/00-check-changelog.t | 17 +++++++++++++++++ 3 files changed, 21 insertions(+) create mode 100644 xt/00-check-changelog.t diff --git a/.travis.yml b/.travis.yml index 0b620b87f..93aca8de8 100644 --- a/.travis.yml +++ b/.travis.yml @@ -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: diff --git a/MANIFEST.SKIP b/MANIFEST.SKIP index b89a823b0..ef7023021 100644 --- a/MANIFEST.SKIP +++ b/MANIFEST.SKIP @@ -244,6 +244,7 @@ pure_all so_locations subdirs ~$ +^xt/ .travis.yml README.md diff --git a/xt/00-check-changelog.t b/xt/00-check-changelog.t new file mode 100644 index 000000000..39aa67887 --- /dev/null +++ b/xt/00-check-changelog.t @@ -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;