Keyboard shortcuts

Press or to navigate between chapters

Press S or / to search in the book

Press ? to show this help

Press Esc to hide this help

Perl with Dist::Zilla Native

name: CI on Native

on:
  push:
  pull_request:
  workflow_dispatch:
#  schedule:
#    - cron: '42 5 * * *'

jobs:
  test:
    strategy:
      fail-fast: false
      matrix:
        runner:
          - ubuntu-latest
          - macos-latest
          - windows-latest
        perl:
          # We need quotes or the 5.30 will be considered 5.3
          - '5.30'
          - '5.42'
        #exclude:
        #  - runner: windows-latest
        #    perl: '5.36'

    runs-on: ${{matrix.runner}}
    name: OS ${{matrix.runner}} Perl ${{matrix.perl}}

    steps:
    - uses: actions/checkout@v6

    - name: Set up perl
      uses: shogo82148/actions-setup-perl@v1
      with:
          perl-version: ${{ matrix.perl }}
          distribution: ${{ ( startsWith( matrix.runner, 'windows-' ) && 'strawberry' ) || 'default' }}

    - name: Show Perl Version
      run: |
        perl -v

    - name: Install Dist::Zilla
      run: |
        cpanm -v
        cpanm --notest --verbose Dist::Zilla

    - name: Install Modules
      run: |
        dzil authordeps --missing | cpanm --notest --verbose
        dzil listdeps --develop --missing | cpanm --notest --verbose
        dzil listdeps --author --missing | cpanm --notest --verbose

    - name: Run tests
      env:
        AUTHOR_TESTING: 1
        RELEASE_TESTING: 1
      run: |
        dzil test --author --release