Skip to content

Commit 8545508

Browse files
committed
Use action to list Perl versions
Automatically add new Perl versions to the test matrix by using the `perl-actions/perl-version` action.
1 parent 0de5505 commit 8545508

File tree

1 file changed

+23
-20
lines changed

1 file changed

+23
-20
lines changed

.github/workflows/build.yaml

Lines changed: 23 additions & 20 deletions
Original file line numberDiff line numberDiff line change
@@ -11,44 +11,47 @@ on:
1111
- "main"
1212

1313
jobs:
14-
perl:
15-
env:
16-
AUTHOR_TESTING: 1
14+
perl-versions:
15+
runs-on: ubuntu-latest
16+
name: List Perl versions
17+
18+
outputs:
19+
perl-versions: ${{ steps.action.outputs.perl-versions }}
20+
21+
steps:
22+
- id: action
23+
uses: perl-actions/perl-versions@v1
24+
with:
25+
since-perl: v5.12
26+
with-devel: false
1727

28+
perl:
1829
runs-on: ubuntu-latest
30+
name: "Perl ${{ matrix.perl-version }}"
31+
needs: [perl-versions]
1932

2033
strategy:
2134
fail-fast: false
2235
matrix:
23-
perl-version:
24-
- "5.38"
25-
- "5.36"
26-
- "5.34"
27-
- "5.32"
28-
- "5.30"
29-
- "5.28"
30-
- "5.26"
31-
- "5.24"
32-
- "5.22"
33-
- "5.20"
34-
- "5.18"
35-
- "5.16"
36-
- "5.14"
37-
- "5.12"
36+
perl-version: ${{ fromJson(needs.perl-versions.outputs.perl-versions) }}
3837

3938
container:
4039
image: perldocker/perl-tester:${{ matrix.perl-version }}
4140

41+
env:
42+
AUTHOR_TESTING: 1
43+
4244
steps:
4345
- uses: actions/checkout@v4
44-
- name: perl -V
45-
run: perl -V
46+
4647
- uses: perl-actions/[email protected]
4748
with:
4849
cpanfile: "cpanfile"
4950
args: "--with-suggests"
5051
sudo: false
52+
5153
- name: Makefile.PL
5254
run: perl Makefile.PL
55+
5356
- name: make test
5457
run: make test

0 commit comments

Comments
 (0)