Skip to content

Commit 9b61192

Browse files
authored
Merge pull request #430 from WCN/github-actions
(Travis) CI is dead, long live the (GitHub) CI!
2 parents 50c1d22 + ad7a4a0 commit 9b61192

File tree

9 files changed

+22
-61
lines changed

9 files changed

+22
-61
lines changed

.github/workflows/test.yml

+5-3
Original file line numberDiff line numberDiff line change
@@ -13,6 +13,7 @@ jobs:
1313
os:
1414
- ubuntu-latest
1515
perl:
16+
- "5.36"
1617
- "5.34"
1718
- "5.32"
1819
- "5.30"
@@ -29,11 +30,11 @@ jobs:
2930
# because concurrency of builds on macos-latest is limit and it takes long time.
3031
include:
3132
- os: macos-latest
32-
perl: "5.34"
33+
perl: "5.36"
3334

3435
steps:
3536
- name: Checkout
36-
uses: actions/checkout@v2
37+
uses: actions/checkout@v3
3738

3839
- name: Set up Perl ${{ matrix.perl }}
3940
uses: shogo82148/actions-setup-perl@v1
@@ -58,4 +59,5 @@ jobs:
5859
- name: Test
5960
run: prove -l -j2 t
6061
env:
61-
AUTHOR_TESTING: "1"
62+
AUTHOR_TESTING: 1
63+
PAWS_SILENCE_UNSTABLE_WARNINGS: 1

.proverc

+1-1
Original file line numberDiff line numberDiff line change
@@ -1 +1 @@
1-
-v -Ilib -Iauto-lib
1+
-Ilib -Iauto-lib

.travis.yml

-32
This file was deleted.

README.md

+2-2
Original file line numberDiff line numberDiff line change
@@ -12,7 +12,7 @@ The project is actually generating all of it's classes from botocore
1212

1313
Project info:
1414

15-
Travis CI status: [![Build Status](https://travis-ci.org/pplu/aws-sdk-perl.svg?branch=master)](https://travis-ci.org/pplu/aws-sdk-perl)
15+
GitHub Actions status: ![Build Status](https://github.com/pplu/aws-sdk-perl/actions/workflows/test.yml/badge.svg)
1616

1717
Version on CPAN: [![CPAN version](https://badge.fury.io/pl/Paws.svg)](https://badge.fury.io/pl/Paws)
1818

@@ -142,7 +142,7 @@ Perl versions
142142
The SDK is targeted at modern Perl versions. Since a new perl gets released every year, distributions perl tend to lag behind, so
143143
support for perl versions on any modern, widespread distribution is our target.
144144
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
145-
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,
145+
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,
146146
you can contribute back. Acceptance of patches for older versions of Perl won't mean that the compatibility will be maintained
147147
long-term, although it will be tried :).
148148

t/01_load.t

+1-1
Original file line numberDiff line numberDiff line change
@@ -14,7 +14,7 @@ my @services = @ARGV > 0 ? @ARGV : sort $paws->available_services;
1414

1515
foreach my $service (@services){
1616
Paws->preload_service($service);
17-
ok(1,"Loaded service $service");
17+
pass("Loaded service $service");
1818
unload($paws->_class_prefix . $service);
1919
}
2020

t/10_responses.t

+3-3
Original file line numberDiff line numberDiff line change
@@ -108,7 +108,7 @@ sub test_file {
108108
} "Call " . $test->service . '->' . $test->method . " from $file";
109109

110110
if (not $passed or $TODO) {
111-
ok(0, "Can't test method access because something went horribly wrong in the call to $call_method");
111+
fail("Can't test method access because something went horribly wrong in the call to $call_method");
112112
next;
113113
}
114114

@@ -124,14 +124,14 @@ sub test_file {
124124
if ($@) {
125125
my $message = $@;
126126
chomp $message;
127-
ok(0, "Exception accessing $t->{path}: $message");
127+
fail("Exception accessing $t->{path}: $message");
128128
}
129129
} else {
130130
die "Didn't know how to get a result to compare to. Check that test has path or dpath entry";
131131
}
132132

133133
if (not defined $got and not defined $t->{expected}){
134-
ok(1, "Got undef on $path from result");
134+
pass("Got undef on $path from result");
135135
} else {
136136
cmp_ok($got, $t->{op}, $t->{expected}, "Got $path $t->{op} $t->{expected} from result");
137137
}

t/15_timeouts.t

+3-8
Original file line numberDiff line numberDiff line change
@@ -13,14 +13,9 @@ use Test::CustomCredentials;
1313

1414
use IO::Socket::INET;
1515

16-
# Do a Volkswagen if we are in Travis. Timeout tests are very instable (since
17-
# when running in Travis, timeouts will usually take more than 61 secs, (probablly
18-
# due to high loads
19-
if ($ENV{TRAVIS} or not defined $ENV{AUTHOR_TESTS}) {
20-
ok(1, 'Travis CI detected. Skipping timeout tests');
21-
done_testing;
22-
exit
23-
}
16+
# Timeout tests are very unstable on CI, probbaly due to high loads.
17+
plan skip_all => 'CI detected. Skipping timeout tests' if $ENV{CI};
18+
plan skip_all => 'Author testing only' unless $ENV{AUTHOR_TESTING};
2419

2520
my $sock = IO::Socket::INET->new(Listen => 5,
2621
LocalAddr => 'localhost',

t/18_mocked.t

+4-4
Original file line numberDiff line numberDiff line change
@@ -62,12 +62,12 @@ sub test_file {
6262
my $passed;
6363
if ($@) {
6464
if ($test->exception) {
65-
ok(1, 'Got an exception, and I was expecting it');
65+
pass('Got an exception, and I was expecting it');
6666
isa_ok($@, 'Paws::Exception');
6767
$passed = 1;
6868
$ret = $@;
6969
} else {
70-
ok(0, 'Got an unexpected exceptions');
70+
fail('Got an unexpected exceptions');
7171
$passed = 0;
7272
}
7373
}
@@ -88,14 +88,14 @@ sub test_file {
8888
if ($@) {
8989
my $message = $@;
9090
chomp $message;
91-
ok(0, "Exception accessing $t->{path}: $message");
91+
fail("Exception accessing $t->{path}: $message");
9292
}
9393
} else {
9494
die "Didn't know how to get a result to compare to. Check that test has path or dpath entry";
9595
}
9696

9797
if (not defined $got and not defined $t->{expected}){
98-
ok(1, "Got undef on $path from result");
98+
pass("Got undef on $path from result");
9999
} else {
100100
cmp_ok($got, $t->{op}, $t->{expected}, "Got $path $t->{op} $t->{expected} from result");
101101
}

t/28_retries_mojoasynccaller.t

+3-7
Original file line numberDiff line numberDiff line change
@@ -12,13 +12,9 @@ use lib 't/lib';
1212

1313
use Test::CustomCredentials;
1414

15-
# Do a Volkswagen if we are in Travis. Timeout tests are very instable (since
16-
# when running in Travis)
17-
if ($ENV{TRAVIS} or not defined $ENV{AUTHOR_TESTS}) {
18-
ok(1, 'Travis CI detected. Skipping timeout tests');
19-
done_testing;
20-
exit
21-
}
15+
# Timeout tests are very unstable on CI, probbaly due to high loads.
16+
plan skip_all => 'CI detected. Skipping timeout tests' if $ENV{CI};
17+
plan skip_all => 'Author testing only' unless $ENV{AUTHOR_TESTING};
2218

2319
my $mojo = eval {
2420
Paws->new(config => {

0 commit comments

Comments
 (0)