Starting at CPAN::Digger I found the Math::Numerical distribution without any Continuous Integration configured.

Adding GitHub Actions to this project was quite straigh forward except for two things:

Adding prerequisites

I had to manually install some prerequsites that were needed for the tests:

    - name: Install Modules
      run: |
        cpanm -v
        cpanm --installdeps --notest .
        cpanm --notest Test2::V0
        cpanm --notest Test2::Tools::PerlCritic
        cpanm --notest Test::Pod
        cpanm --notest IPC::Run3
        cpanm --notest Readonly

This has been bothering me for some time now so I asked both on Reddit and on PerlMonks.

Disable Windows

I think at the time I was doing this there was some problem with the Windows infrastructure of GitHub Actions or the Perl that was supposed to be installed on Windows so I had to disable the Windows runner. The author of the module can later enable it to see if the isses were fixed already.

Speed

It took 9-10 minutes to run the job on OSX. (5 min on Ubuntu Linux) The main time consuming part is the installation of the test prerequisites. I added the --notest flag to the cpanm commands that reduced the run-time to 2 minutes.

Full configuration file

examples/math-numerical-ci.yml

  1. name: Perl
  2.  
  3. on:
  4. push:
  5. pull_request:
  6.  
  7. jobs:
  8. test:
  9. strategy:
  10. fail-fast: false
  11. matrix:
  12. runner: [ubuntu-latest, macos-latest] # , windows-latest
  13. perl: [ '5.36' ]
  14.  
  15. runs-on: ${{matrix.runner}}
  16. name: OS ${{matrix.runner}} Perl ${{matrix.perl}}
  17.  
  18. steps:
  19. - uses: actions/checkout@v2
  20.  
  21. - name: Set up perl
  22. uses: shogo82148/actions-setup-perl@v1
  23. with:
  24. perl-version: ${{ matrix.perl }}
  25. distribution: ${{ ( startsWith( matrix.runner, 'windows-' ) && 'strawberry' ) || 'default' }}
  26.  
  27. - name: Show Perl Version
  28. run: |
  29. perl -v
  30.  
  31. - name: Install Modules
  32. run: |
  33. cpanm -v
  34. cpanm --installdeps --notest .
  35. cpanm --notest Test2::V0
  36. cpanm --notest Test2::Tools::PerlCritic
  37. cpanm --notest Test::Pod
  38. cpanm --notest IPC::Run3
  39. cpanm --notest Readonly
  40.  
  41. - name: Run tests
  42. env:
  43. TEST_AUTHOR: 1
  44. run: |
  45. perl Makefile.PL
  46. make
  47. make test
  48.  
  49. - name: Show Errors on Windows
  50. if: ${{ failure() && startsWith( matrix.runner, 'windows-')}}
  51. run: |
  52. ls -l C:/Users/
  53. ls -l C:/Users/RUNNER~1/
  54. cat C:/Users/runneradmin/.cpanm/work/*/build.log
  55.  
  56. - name: Show Errors on Ubuntu
  57. if: ${{ failure() && startsWith( matrix.runner, 'ubuntu-')}}
  58. run: |
  59. cat /home/runner/.cpanm/work/*/build.log
  60.  
  61. - name: Show Errors on OSX
  62. if: ${{ failure() && startsWith( matrix.runner, 'macos-')}}
  63. run: |
  64. cat /Users/runner/.cpanm/work/*/build.log
  65.