Add .github/workflows/build.yml #28
Workflow file for this run
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: test | |
on: [push, pull_request] | |
jobs: | |
build: | |
runs-on: ${{ matrix.os }} | |
strategy: | |
matrix: | |
os: ['ubuntu-latest', 'macos-latest', 'windows-latest'] | |
perl: [ '5.34', '5.32', '5.30' ] | |
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 }} | |
env: | |
CODECOV_TOKEN: ${{ secrets.CODECOV_TOKEN }} | |
- run: cpanm --quiet --notest --skip-satisfied Devel::Cover Devel::Cover::Report::Codecov Devel::Cover::Report::Codecov Module::Build::Tiny | |
- run: cpanm --quiet --notest --skip-satisfied --installdeps --with-recommend . | |
- run: perl -V | |
- run: cpanm --installdeps . | |
- run: cover -test | |
codecov: | |
runs-on: ubuntu-latest | |
container: perl:latest | |
steps: | |
- uses: actions/checkout@v3 | |
- name: Run codecov GitHub Action | |
env: | |
CODECOV_TOKEN: ${{ secrets.CODECOV_TOKEN }} | |
run: | | |
cpanm --quiet --notest Module::Build::Tiny Devel::Cover Devel::Cover::Report::Codecovbash | |
perl Build.PL | |
cover -test -report codecov |