-
Notifications
You must be signed in to change notification settings - Fork 1
36 lines (35 loc) · 1.04 KB
/
build-and-test.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
name: Build and test
on:
workflow_dispatch
# push:
# branches: 'main'
# pull_request:
# branches: '*'
# schedule:
# - cron: '42 5 * * 0'
jobs:
build:
runs-on: ${{ matrix.os }}
strategy:
matrix:
os: ['ubuntu-latest', 'macos-latest']
#os: ['ubuntu-latest', 'macos-latest', 'windows-2019']
perl: ['5.38', '5.36', '5.34', '5.32', '5.30', '5.28', '5.26']
name: Perl ${{ matrix.perl }} on ${{ matrix.os }}
steps:
- uses: actions/checkout@v3
- name: Run tests (no coverage)
uses: shogo82148/actions-setup-perl@v1
with:
perl-version: ${{ matrix.perl }}
- run: perl -V
- run: cpanm -n --installdeps .
- run: prove -l t
- name: Run tests (with coverage)
if: ${{ matrix.perl == '5.30' && matrix.os == 'ubuntu-latest' }}
env:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
run: |
perl Makefile.PL
cpanm -n Devel::Cover::Report::Coveralls
cover -test -report Coveralls