Earlier we saw how to use CPAN::Digger to find a Perl project to contribute to. This time we used CPAN::Digger and found the Graphics-Toolkit-Color project to which we added a GitHub Actions configuration file to enable Continuous Integration (CI) executing the tests of the module on every push.
I created a fork of the GitHub repository and in a branch I added the following file to be ./github/workflows/ci.yml. (copied from the try-github-actions repository.
Once the changes were pushed out the instructions started to run on the servers of GitHub.
When I saw the tests passed I could send the Pull-Request.
examples/perl-dzil-for-graphics-toolkit-color.yml
name: Perl
on:
push:
pull_request:
jobs:
test:
strategy:
fail-fast: false
matrix:
runner: [ubuntu-latest] # , macos-latest, windows-latest
perl: [ '5.32' ]
runs-on: ${{matrix.runner}}
name: OS ${{matrix.runner}} Perl ${{matrix.perl}}
steps:
- uses: actions/checkout@v2
- 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 Dist::Zilla
- name: Install Modules
run: |
dzil authordeps --missing | cpanm --notest
- name: Run tests
run: |
dzil test
- name: Show Errors
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