Skip to content

Commit 6fd3df7

Browse files
committed
Add test for perl-tester images
1 parent 49c9e5e commit 6fd3df7

File tree

2 files changed

+50
-2
lines changed

2 files changed

+50
-2
lines changed

.github/workflows/check.yml

Lines changed: 47 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -37,7 +37,9 @@ jobs:
3737
run: |
3838
cpm --version
3939
40+
### ------------------------------------------------
4041
### Install a single module
42+
### ------------------------------------------------
4143

4244
one_module:
4345
runs-on: ubuntu-latest
@@ -49,7 +51,9 @@ jobs:
4951
with:
5052
install: "Simple::Accessor"
5153

54+
### ------------------------------------------------
5255
### Install multiple modules
56+
### ------------------------------------------------
5357

5458
multiple_modules:
5559
runs-on: ubuntu-latest
@@ -63,7 +67,9 @@ jobs:
6367
Simple::Accessor
6468
Test::Parallel
6569
70+
### ------------------------------------------------
6671
### Install modules from a cpanfile
72+
### ------------------------------------------------
6773

6874
cpanfile_root:
6975
runs-on: ubuntu-latest
@@ -94,7 +100,9 @@ jobs:
94100
global: false
95101
path: "cpm"
96102

103+
### ------------------------------------------------
97104
### Install a module and enable tests
105+
### ------------------------------------------------
98106

99107
with_tests:
100108
runs-on: ubuntu-latest
@@ -107,7 +115,9 @@ jobs:
107115
install: "Simple::Accessor"
108116
tests: true
109117

118+
### ------------------------------------------------
110119
### check perl-tester
120+
### ------------------------------------------------
111121

112122
perl_tester:
113123
runs-on: ubuntu-latest
@@ -133,7 +143,9 @@ jobs:
133143
global: true
134144
sudo: false
135145

146+
### ------------------------------------------------
136147
### Use some custom args to install
148+
### ------------------------------------------------
137149

138150
with_args:
139151
runs-on: ubuntu-latest
@@ -148,3 +160,38 @@ jobs:
148160
with:
149161
cpanfile: "cpanfile.test"
150162
args: "--with-recommends --with-suggests"
163+
164+
## ------------------------------------------------
165+
## testing with Perl from perl-tester
166+
## ------------------------------------------------
167+
perl:
168+
runs-on: ubuntu-latest
169+
name: "perl v${{ matrix.perl-version }}"
170+
171+
strategy:
172+
fail-fast: false
173+
matrix:
174+
perl-version:
175+
- "5.30"
176+
- "5.28"
177+
# ...
178+
179+
container:
180+
image: perldocker/perl-tester:${{ matrix.perl-version }}
181+
182+
steps:
183+
- name: perl -V
184+
run: perl -V
185+
186+
- uses: actions/checkout@v2
187+
- name: "install-with-cpm"
188+
189+
uses: ./
190+
with:
191+
sudo: false
192+
install: |
193+
abbreviation
194+
ACH
195+
# checking that both modules are installed
196+
- run: perl -Mabbreviation -e1
197+
- run: perl -MACH -e1

README.md

Lines changed: 3 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -25,10 +25,11 @@ This action installs 'cpm' as root so you can then use it in your workflow.
2525
# perl: 'perl'
2626
```
2727

28-
## Using it in a GitHub workflow
28+
## Using install-with-cpm in a GitHub workflow
2929

3030
Here is a sample integration using install-with-cpm action
31-
to test your Perl Module using multiple Perl versions.
31+
to test your Perl Modules using multiple Perl versions via the
32+
perl-tester images.
3233

3334
```yaml
3435
# .github/workflows/linux.yml

0 commit comments

Comments
 (0)