diff --git a/.github/workflows/ci.yaml b/.github/workflows/ci.yaml index 58984c0..b44c5cc 100644 --- a/.github/workflows/ci.yaml +++ b/.github/workflows/ci.yaml @@ -1,20 +1,34 @@ name: CI on: [push, pull_request] + jobs: + perl-versions: + runs-on: ubuntu-latest + name: List Perl versions + outputs: + perl-versions: ${{ steps.action.outputs.perl-versions }} + steps: + - id: action + uses: perl-actions/perl-versions@v1 + with: + since-perl: v5.8 + with-devel: true test: + needs: + - perl-versions strategy: fail-fast: false matrix: - perl: [ '5.20', '5.22', '5.24', '5.26', '5.28', '5.30', '5.32', '5.34', '5.36', '5.36-threaded' ] - # See options here: https://hub.docker.com/_/perl/tags + perl-version: ${{ fromJson (needs.perl-versions.outputs.perl-versions) }} runs-on: ubuntu-latest - name: perl ${{matrix.perl}} - container: perl:${{matrix.perl}} + name: perl ${{matrix.perl-version}} + container: + image: perldocker/perl-tester:${{ matrix.perl-version }} steps: - - uses: actions/checkout@v3 + - uses: actions/checkout@v4 - name: Show perl version run: | perl -v @@ -28,4 +42,4 @@ jobs: run: | perl Makefile.PL make - make test \ No newline at end of file + make test diff --git a/t/000.2-warn.t b/t/000.2-warn.t index 2851b81..f0322fc 100644 --- a/t/000.2-warn.t +++ b/t/000.2-warn.t @@ -2,6 +2,8 @@ use strict; use warnings; use Test::More tests => 1; use Data::Printer::Common; +use File::Spec; +my $dir_sep_char = File::Spec->catfile('', ''); sub warnings(&) { my $code = shift; @@ -15,4 +17,4 @@ sub warnings(&) { my $got = warnings { Data::Printer::Common::_warn(undef, "HA!") }; -is( $got, "[Data::Printer] HA! at t/000.2-warn.t line 16.\n", 'warn with proper caller/line' ); +is( $got, "[Data::Printer] HA! at t${dir_sep_char}000.2-warn.t line 18.\n", 'warn with proper caller/line' ); diff --git a/t/026-caller_message.t b/t/026-caller_message.t index c685cb0..6b448b4 100644 --- a/t/026-caller_message.t +++ b/t/026-caller_message.t @@ -1,6 +1,8 @@ use strict; use warnings; use Test::More tests => 2; +use File::Spec; +my $dir_sep_char = File::Spec->catfile('', ''); BEGIN { use Data::Printer::Config; @@ -19,13 +21,13 @@ my $x; my $got = p $x; is( $got, - 'Printing in line 19 of t/026-caller_message.t: undef', + "Printing in line 21 of t${dir_sep_char}026-caller_message.t: undef", 'caller_info shows the proper caller message (after)' ); $got = p $x, caller_message_position => 'after'; is( $got, - 'undef Printing in line 26 of t/026-caller_message.t:', + "undef Printing in line 28 of t${dir_sep_char}026-caller_message.t:", 'caller_info shows the proper caller message (before)' );