Skip to content
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
38 changes: 30 additions & 8 deletions .github/workflows/cpan-test.yml
Original file line numberDiff line numberDiff line change
Expand Up@@ -8,11 +8,15 @@ on:
perl_version:
required: false
type: string
default: "['5.24', '5.26', '5.28', '5.30', '5.32', '5.34', '5.36', '5.38']"
default: '["5.24", "5.26", "5.28", "5.30", "5.32", "5.34", "5.36", "5.38"]'
os:
required: false
type: string
default: "['windows-latest', 'macos-latest', 'ubuntu-latest']"
default: '["windows-latest", "macos-latest", "ubuntu-latest"]'
testing_context:
required: false
type: string
default: '[ ]'

jobs:
testing:
Expand All@@ -32,18 +36,36 @@ jobs:
run: perl -V
- name: Install modules
run: cpanm --notest --with-configure --with-develop --no-man-pages --installdeps .
- name: Configure with Makefile.PL
id: configure-with-eumm
if: ${{ hashFiles('Makefile.PL') != '' }}
run: |
perl Makefile.PL
make
- name: Configure with Build.PL
id: configure-with-mb
if: ${{ hashFiles('Build.PL') != '' }}
run: |
perl Build.PL
./Build
- name: Configure with Makefile.PL
if: ${{ hashFiles('Makefile.PL') != '' }}
- name: Set testing contexts
- name: Set testing context
if: "!startsWith(matrix.os, 'windows')"
run: |
perl Makefile.PL
make
- name: Run tests
run: prove --blib --verbose t
printf '%s\n' '${{ inputs.testing_context }}' | \
jq -r '.[]' | \
tr '[:lower:]' '[:upper:]' | \
while read -r item; do
printf '%s_TESTING=1\n' "${item}" >> "${GITHUB_ENV}"
done
- name: Run tests with make
if: steps.configure-with-eumm.outcome == 'success'
run : |
make TEST_VERBOSE=1 test
- name: Run tests with ./Build
if: steps.configure-with-mb.outcome == 'success'
run : |
./Build verbose=1 test
- name: Archive CPAN logs on Windows
if: ${{ failure() && matrix.os == 'windows-latest' }}
uses: actions/upload-artifact@v4
Expand Down