-
Notifications
You must be signed in to change notification settings - Fork 32
51 lines (49 loc) · 1.29 KB
/
linux.yml
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
name: linux
on:
push:
branches: [ '*' ]
pull_request:
branches: [ main, dev ]
workflow_dispatch:
branches: [ '*' ]
jobs:
perl:
runs-on: ubuntu-latest
strategy:
fail-fast: false
matrix:
perl-version:
- '5.16'
- '5.18'
- '5.20'
- '5.22'
- '5.24'
- '5.26'
- '5.28'
- '5.30'
include:
- perl-version: '5.32'
os: ubuntu-latest
coverage: true
container:
image: perl:${{ matrix.perl-version }}
steps:
- uses: actions/checkout@v2
- run: env | sort
- run: perl -V
- name: Install older dependency versions for older Perls
run: |
if perl -Mversion -E 'exit not version->parse("v$ARGV[0]") < version->parse('v5.20')' ${{ matrix.perl-version }}; then
cpanm -n 'Getopt::Long::Descriptive~<0.105' 'App::Cmd~<0.332'
fi
- run: cpanm -n --installdeps .
- name: Run tests (no coverage)
if: ${{ !matrix.coverage }}
run: prove -lr t
- name: Run tests (with coverage)
if: ${{ matrix.coverage }}
env:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
run: |
cpanm -n Devel::Cover::Report::Coveralls
perl Build.PL && ./Build build && cover -test -report coveralls