summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorbrian d foy <briandfoy@pobox.com>2022-08-26 09:02:03 -0400
committerbrian d foy <briandfoy@pobox.com>2022-08-26 09:02:03 -0400
commit8aab6f2e37eb09eed66706c47f4d84cbedfa0772 (patch)
tree73e2da365294d4d7c4913636c7df24ecad409aa7
parent36dad7b5ebea80a9b5b106f65961146be1fb6de4 (diff)
Update linux workflow (18.04 deprecated)
-rw-r--r--.github/workflows/linux.yml66
1 files changed, 60 insertions, 6 deletions
diff --git a/.github/workflows/linux.yml b/.github/workflows/linux.yml
index 9dd996e..daf2647 100644
--- a/.github/workflows/linux.yml
+++ b/.github/workflows/linux.yml
@@ -1,3 +1,8 @@
+# brian's standard GitHub Actions Ubuntu config for Perl 5 modules
+# version 20220825.001
+# https://github.com/briandfoy/github_workflows
+# https://github.com/features/actions
+# This file is licensed under the Artistic License 2.0
name: ubuntu
on:
@@ -6,12 +11,18 @@ on:
- '**'
- '!**windows**'
- '!**macos**'
+ - '!**release**'
tags-ignore:
+ # I tag release pushes but those should have already been tested
- 'release-*'
paths-ignore:
+ # list all the files which are irrelevant to the tests
+ # non-code, support files, docs, etc
- '.appveyor.yml'
+ - '.gitattributes'
- '.github/workflows/macos.yml'
- '.github/workflows/windows.yml'
+ - '.github/workflows/release.yml'
- '.gitignore'
- '.releaserc'
- 'Changes'
@@ -22,14 +33,25 @@ on:
jobs:
perl:
runs-on: ${{ matrix.os }}
- environment: testing
strategy:
matrix:
os:
- - ubuntu-18.04
- - ubuntu-20.04
+ - ubuntu-22.04
perl-version:
+ - '5.8'
- '5.10'
+ - '5.12'
+ - '5.14'
+ - '5.16'
+ - '5.18'
+ - '5.20'
+ - '5.22'
+ - '5.24'
+ - '5.26'
+ - '5.28'
+ - '5.30'
+ - '5.32'
+ - '5.34'
- 'latest'
container:
image: perl:${{ matrix.perl-version }}
@@ -38,15 +60,27 @@ jobs:
- name: Platform check
run: uname -a
- name: Perl version check
- run: perl -V
+ run: |
+ perl -V
+ perl -v | perl -0777 -ne 'm/(v5\.\d+)/ && print "PERL_VERSION=$1"' >> $GITHUB_ENV
+# Some older versions of Perl have trouble with hostnames in certs. I
+# haven't figured out why.
- name: Setup environment
run: |
echo "PERL_LWP_SSL_VERIFY_HOSTNAME=0" >> $GITHUB_ENV
+# I had some problems with openssl on Ubuntu, so I punted by installing
+# cpanm first, which is easy. I can install IO::Socket::SSL with that,
+# then switch back to cpan. I didn't explore this further, but what you
+# see here hasn't caused problems for me.
+# Need HTTP::Tiny 0.055 or later.
- name: Install cpanm and multiple modules
run: |
curl -L https://cpanmin.us | perl - App::cpanminus
- cpanm --notest IO::Socket::SSL App::Cpan ExtUtils::MakeMaker LWP LWP::Protocol::https App::Cpan
- cpan -M https://www.cpan.org -T ExtUtils::MakeMaker
+ cpanm --notest IO::Socket::SSL App::Cpan HTTP::Tiny
+ cpan -M https://www.cpan.org -T ExtUtils::MakeMaker Test::Manifest
+# Install the dependencies, again not testing them. This installs the
+# module in the current directory, so we end up installing the module,
+# but that's not a big deal.
- name: Install dependencies
run: |
cpan -M https://www.cpan.org -T .
@@ -54,18 +88,38 @@ jobs:
run: |
perl Makefile.PL
make test
+# Run author tests, but only if there's an xt/ directory
+ - name: Author tests
+ if: hashFiles('xt') != ''
+ run: |
+ cpan -M https://www.cpan.org -T Test::CPAN::Changes
+ prove -r -b xt
+# Running tests in parallel should be faster, but it's also more
+# tricky in cases where different tests share a feature, such as a
+# file they want to write to. Parallel tests can stomp on each other.
+# Test in parallel to catch that, because other people will test your
+# stuff in parallel.
- name: Run tests in parallel
run: |
perl Makefile.PL
HARNESS_OPTIONS=j10 make test
+# The disttest target creates the distribution, unwraps it, changes
+# into the dist dir, then runs the tests there. That checks that
+# everything that should be in the dist is in the dist. If you forget
+# to update MANIFEST with new modules, data files, and so on, you
+# should notice the error.
- name: Run distribution tests
run: |
perl Makefile.PL
make disttest
+ make clean
+# And, coverage reports, but only under 5.10 and later since modern
+# Devel::Cover instances don't work with 5.8
- name: Run coverage tests
if: env.PERL_VERSION != 'v5.8'
env:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
run: |
cpan -M https://www.cpan.org -T Devel::Cover Devel::Cover::Report::Coveralls
+ perl Makefile.PL
cover -test -report coveralls