Skip to content

Merge pull request #6 from davorg-cpan/dependabot/github_actions/acti… #35

Merge pull request #6 from davorg-cpan/dependabot/github_actions/acti…

Merge pull request #6 from davorg-cpan/dependabot/github_actions/acti… #35

Workflow file for this run

# This is a basic workflow to help you get started with Actions
name: CI
# Controls when the action will run. Triggers the workflow on push or pull request
# events but only for the master branch
on:
push:
branches:
- '**'
pull_request:
branches: [ master ]
workflow_dispatch:
# A workflow run is made up of one or more jobs that can run sequentially or in parallel
jobs:
build:
runs-on: ${{ matrix.os }}
strategy:
matrix:
os: ['ubuntu-latest', 'macos-latest', 'windows-latest']
perl: [ 'latest' ]
name: Perl ${{ matrix.perl }} on ${{ matrix.os }}
steps:
- name: Set up perl
uses: shogo82148/actions-setup-perl@v1
with:
perl-version: ${{ matrix.perl }}
- run: perl -V
- name: Checkout code
uses: actions/checkout@v4
- run: cpanm -n --installdeps .
- run: prove -lv t
- name: Archive CPAN logs on Windows
if: ${{ failure() && matrix.os == 'windows-latest' }}
uses: actions/upload-artifact@v3
with:
name: cpan_log
path: C:\Users\RUNNER~1\.cpanm\work\*\build.log
retention-days: 5
- name: Archive CPAN logs on Unix
if: ${{ failure() && matrix.os != 'windows-latest' }}
uses: actions/upload-artifact@v3
with:
name: cpan_log
path: .cpanm/work/*/build.log
retention-days: 5
coverage:
runs-on: ubuntu-latest
container: davorg/perl-coveralls:latest
name: Test coverage
steps:
- uses: actions/checkout@v4
- name: Install modules
run: cpanm -n --installdeps .
- name: Coverage
env:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
run: cover -test -report Coveralls