From ad7a4a04d26d43346894c255ef0b01dce1788c3e Mon Sep 17 00:00:00 2001 From: James Raspass Date: Wed, 2 Aug 2023 11:29:48 +0100 Subject: [PATCH] (Travis) CI is dead, long live the (GitHub) CI! - Bump the latest Perl in the GH Actions - Bump the checkout action - Reduce the verbosity of CI tests - Drop the obsolete .travis.yml file - Switch the README CI status icon to GitHub - Update some mentions of Travis - Replace ok(1)/ok(0) with pass/fail in tests - Replace $ENV{TRAVIS} with $ENV{CI} in tests - Consistently use $ENV{AUTHOR_TESTING} in tests --- .github/workflows/test.yml | 8 +++++--- .proverc | 2 +- .travis.yml | 32 -------------------------------- README.md | 4 ++-- t/01_load.t | 2 +- t/10_responses.t | 6 +++--- t/15_timeouts.t | 11 +++-------- t/18_mocked.t | 8 ++++---- t/28_retries_mojoasynccaller.t | 10 +++------- 9 files changed, 22 insertions(+), 61 deletions(-) delete mode 100644 .travis.yml diff --git a/.github/workflows/test.yml b/.github/workflows/test.yml index feee818eb2..c2f8f1ee43 100644 --- a/.github/workflows/test.yml +++ b/.github/workflows/test.yml @@ -13,6 +13,7 @@ jobs: os: - ubuntu-latest perl: + - "5.36" - "5.34" - "5.32" - "5.30" @@ -29,11 +30,11 @@ jobs: # because concurrency of builds on macos-latest is limit and it takes long time. include: - os: macos-latest - perl: "5.34" + perl: "5.36" steps: - name: Checkout - uses: actions/checkout@v2 + uses: actions/checkout@v3 - name: Set up Perl ${{ matrix.perl }} uses: shogo82148/actions-setup-perl@v1 @@ -58,4 +59,5 @@ jobs: - name: Test run: prove -l -j2 t env: - AUTHOR_TESTING: "1" + AUTHOR_TESTING: 1 + PAWS_SILENCE_UNSTABLE_WARNINGS: 1 diff --git a/.proverc b/.proverc index 57607c54ec..01c76eda0b 100644 --- a/.proverc +++ b/.proverc @@ -1 +1 @@ --v -Ilib -Iauto-lib +-Ilib -Iauto-lib diff --git a/.travis.yml b/.travis.yml deleted file mode 100644 index 903c3f542c..0000000000 --- a/.travis.yml +++ /dev/null @@ -1,32 +0,0 @@ -language: perl -git: - submodules: false -env: - - IN_TRAVIS=1 AUTHOR_TESTING=1 -perl: - - "dev" - - "5.28" - - "5.26" - - "5.24" - - "5.22" - - "5.20" - - "5.18" - - "5.16" - - "5.14" - - "5.12" - - "5.10" -matrix: - allow_failures: - - perl: dev - - perl: 5.8 -before_install: - - git clone git://github.com/travis-perl/helpers ~/travis-perl-helpers - - source ~/travis-perl-helpers/init - - build-perl - - perl -V - - build-dist - - cd $BUILD_DIR # $BUILD_DIR is set by the build-dist command -install: - - cpan-install --deps # installs prereqs, including recommends -script: - - prove -l -j$(test-jobs) $(test-files) # parallel testing diff --git a/README.md b/README.md index 647c6014fe..32bf9e5a1e 100644 --- a/README.md +++ b/README.md @@ -12,7 +12,7 @@ The project is actually generating all of it's classes from botocore Project info: -Travis CI status: [![Build Status](https://travis-ci.org/pplu/aws-sdk-perl.svg?branch=master)](https://travis-ci.org/pplu/aws-sdk-perl) +GitHub Actions status: ![Build Status](https://github.com/pplu/aws-sdk-perl/actions/workflows/test.yml/badge.svg) Version on CPAN: [![CPAN version](https://badge.fury.io/pl/Paws.svg)](https://badge.fury.io/pl/Paws) @@ -142,7 +142,7 @@ Perl versions The SDK is targeted at modern Perl versions. Since a new perl gets released every year, distributions perl tend to lag behind, so support for perl versions on any modern, widespread distribution is our target. Very old versions may work, but no intention to support them is made. You can always install a modern version of perl with perlbrew or -plenv in a breeze. We're running the test cases on Travis for all "supported" perl versions. If you want to support a lower version, +plenv in a breeze. We're running the test cases on GitHub Actions for all "supported" perl versions. If you want to support a lower version, you can contribute back. Acceptance of patches for older versions of Perl won't mean that the compatibility will be maintained long-term, although it will be tried :). diff --git a/t/01_load.t b/t/01_load.t index 1ae206fc56..fff7fa3d86 100644 --- a/t/01_load.t +++ b/t/01_load.t @@ -14,7 +14,7 @@ my @services = @ARGV > 0 ? @ARGV : sort $paws->available_services; foreach my $service (@services){ Paws->preload_service($service); - ok(1,"Loaded service $service"); + pass("Loaded service $service"); unload($paws->_class_prefix . $service); } diff --git a/t/10_responses.t b/t/10_responses.t index b733040e07..120c16a593 100644 --- a/t/10_responses.t +++ b/t/10_responses.t @@ -108,7 +108,7 @@ sub test_file { } "Call " . $test->service . '->' . $test->method . " from $file"; if (not $passed or $TODO) { - ok(0, "Can't test method access because something went horribly wrong in the call to $call_method"); + fail("Can't test method access because something went horribly wrong in the call to $call_method"); next; } @@ -124,14 +124,14 @@ sub test_file { if ($@) { my $message = $@; chomp $message; - ok(0, "Exception accessing $t->{path}: $message"); + fail("Exception accessing $t->{path}: $message"); } } else { die "Didn't know how to get a result to compare to. Check that test has path or dpath entry"; } if (not defined $got and not defined $t->{expected}){ - ok(1, "Got undef on $path from result"); + pass("Got undef on $path from result"); } else { cmp_ok($got, $t->{op}, $t->{expected}, "Got $path $t->{op} $t->{expected} from result"); } diff --git a/t/15_timeouts.t b/t/15_timeouts.t index de89fdc1b6..e346a7a675 100644 --- a/t/15_timeouts.t +++ b/t/15_timeouts.t @@ -13,14 +13,9 @@ use Test::CustomCredentials; use IO::Socket::INET; -# Do a Volkswagen if we are in Travis. Timeout tests are very instable (since -# when running in Travis, timeouts will usually take more than 61 secs, (probablly -# due to high loads -if ($ENV{TRAVIS} or not defined $ENV{AUTHOR_TESTS}) { - ok(1, 'Travis CI detected. Skipping timeout tests'); - done_testing; - exit -} +# Timeout tests are very unstable on CI, probbaly due to high loads. +plan skip_all => 'CI detected. Skipping timeout tests' if $ENV{CI}; +plan skip_all => 'Author testing only' unless $ENV{AUTHOR_TESTING}; my $sock = IO::Socket::INET->new(Listen => 5, LocalAddr => 'localhost', diff --git a/t/18_mocked.t b/t/18_mocked.t index bfb818b666..b69c7d861b 100644 --- a/t/18_mocked.t +++ b/t/18_mocked.t @@ -62,12 +62,12 @@ sub test_file { my $passed; if ($@) { if ($test->exception) { - ok(1, 'Got an exception, and I was expecting it'); + pass('Got an exception, and I was expecting it'); isa_ok($@, 'Paws::Exception'); $passed = 1; $ret = $@; } else { - ok(0, 'Got an unexpected exceptions'); + fail('Got an unexpected exceptions'); $passed = 0; } } @@ -88,14 +88,14 @@ sub test_file { if ($@) { my $message = $@; chomp $message; - ok(0, "Exception accessing $t->{path}: $message"); + fail("Exception accessing $t->{path}: $message"); } } else { die "Didn't know how to get a result to compare to. Check that test has path or dpath entry"; } if (not defined $got and not defined $t->{expected}){ - ok(1, "Got undef on $path from result"); + pass("Got undef on $path from result"); } else { cmp_ok($got, $t->{op}, $t->{expected}, "Got $path $t->{op} $t->{expected} from result"); } diff --git a/t/28_retries_mojoasynccaller.t b/t/28_retries_mojoasynccaller.t index 571ceed79b..a132beab15 100644 --- a/t/28_retries_mojoasynccaller.t +++ b/t/28_retries_mojoasynccaller.t @@ -12,13 +12,9 @@ use lib 't/lib'; use Test::CustomCredentials; -# Do a Volkswagen if we are in Travis. Timeout tests are very instable (since -# when running in Travis) -if ($ENV{TRAVIS} or not defined $ENV{AUTHOR_TESTS}) { - ok(1, 'Travis CI detected. Skipping timeout tests'); - done_testing; - exit -} +# Timeout tests are very unstable on CI, probbaly due to high loads. +plan skip_all => 'CI detected. Skipping timeout tests' if $ENV{CI}; +plan skip_all => 'Author testing only' unless $ENV{AUTHOR_TESTING}; my $mojo = eval { Paws->new(config => {