Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Add GitHub Actions #3

Merged
merged 2 commits into from
Dec 8, 2022
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
65 changes: 65 additions & 0 deletions .github/workflows/ci.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,65 @@
name: CI

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: [ '5.30', '5.36' ]
Copy link
Owner

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Is it possible to run it on earlier Perls? The module gives v5.10 as minimum, so I'd at least like to run tests on earlier versions of Perl if possible.

exclude:
- runner: windows-latest
perl: '5.36'

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

steps:
- uses: actions/checkout@v3

- 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 dependencies
run: |
cpanm -v
cpanm --notest --installdeps .

- name: Show Errors on Windows
if: ${{ failure() && startsWith( matrix.runner, 'windows-')}}
run: |
ls -l C:/Users/
ls -l C:/Users/RUNNER~1/
cat C:/Users/runneradmin/.cpanm/work/*/build.log

- name: Show Errors on Ubuntu
if: ${{ failure() && startsWith( matrix.runner, 'ubuntu-')}}
run: |
cat /home/runner/.cpanm/work/*/build.log

- name: Show Errors on OSX
if: ${{ failure() && startsWith( matrix.runner, 'macos-')}}
run: |
cat /Users/runner/.cpanm/work/*/build.log

- name: Run tests
env:
AUTHOR_TESTING: 1
RELEASE_TESTING: 1
run: |
prove -l