CI #1
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
name: CI | |
on: | |
push: | |
branches: [ main ] | |
pull_request: | |
branches: [ main ] | |
workflow_dispatch: | |
jobs: | |
build: | |
runs-on: ${{ matrix.os }} | |
strategy: | |
matrix: | |
os: [ ubuntu-latest, windows-latest, macos-latest ] | |
perl: [ '5.34', '5.32', '5.28', '5.24', '5.18', '5.14' ] | |
include: | |
- perl: '5.32' | |
os: ubuntu-latest | |
coverage: true | |
name: Perl ${{ matrix.perl }} on ${{ matrix.os }} | |
steps: | |
- uses: actions/checkout@v3 | |
- name: Set up perl | |
uses: shogo82148/actions-setup-perl@v1 | |
with: | |
perl-version: ${{ matrix.perl }} | |
- name: Perl version | |
run: perl -V | |
- name: Set up Windows | |
if: matrix.os != 'windows-latest' | |
run: cpanm ExtUtils::PL2Bat | |
- name: Install prereqs | |
run: | | |
cpanm ExtUtils::MakeMaker | |
cpanm --installdeps . | |
- name: Run tests (no coverage) | |
if: ${{ !matrix.coverage }} | |
run: prove -lv t | |
- name: Run tests (with coverage) | |
if: ${{ matrix.coverage }} | |
env: | |
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }} | |
run: | | |
cpanm -n Devel::Cover::Report::Coveralls | |
cover -test -report Coveralls |