Skip to content

Commit

Permalink
Merge pull request #430 from WCN/github-actions
Browse files Browse the repository at this point in the history
(Travis) CI is dead, long live the (GitHub) CI!
  • Loading branch information
byterock authored Aug 3, 2023
2 parents 50c1d22 + ad7a4a0 commit 9b61192
Show file tree
Hide file tree
Showing 9 changed files with 22 additions and 61 deletions.
8 changes: 5 additions & 3 deletions .github/workflows/test.yml
Original file line number Diff line number Diff line change
Expand Up @@ -13,6 +13,7 @@ jobs:
os:
- ubuntu-latest
perl:
- "5.36"
- "5.34"
- "5.32"
- "5.30"
Expand All @@ -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
Expand All @@ -58,4 +59,5 @@ jobs:
- name: Test
run: prove -l -j2 t
env:
AUTHOR_TESTING: "1"
AUTHOR_TESTING: 1
PAWS_SILENCE_UNSTABLE_WARNINGS: 1
2 changes: 1 addition & 1 deletion .proverc
Original file line number Diff line number Diff line change
@@ -1 +1 @@
-v -Ilib -Iauto-lib
-Ilib -Iauto-lib
32 changes: 0 additions & 32 deletions .travis.yml

This file was deleted.

4 changes: 2 additions & 2 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -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)

Expand Down Expand Up @@ -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 :).

Expand Down
2 changes: 1 addition & 1 deletion t/01_load.t
Original file line number Diff line number Diff line change
Expand Up @@ -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);
}

Expand Down
6 changes: 3 additions & 3 deletions t/10_responses.t
Original file line number Diff line number Diff line change
Expand Up @@ -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;
}

Expand All @@ -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");
}
Expand Down
11 changes: 3 additions & 8 deletions t/15_timeouts.t
Original file line number Diff line number Diff line change
Expand Up @@ -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',
Expand Down
8 changes: 4 additions & 4 deletions t/18_mocked.t
Original file line number Diff line number Diff line change
Expand Up @@ -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;
}
}
Expand All @@ -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");
}
Expand Down
10 changes: 3 additions & 7 deletions t/28_retries_mojoasynccaller.t
Original file line number Diff line number Diff line change
Expand Up @@ -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 => {
Expand Down

0 comments on commit 9b61192

Please sign in to comment.