GitHub Actions now supports CI/CD. If you host your repositories in GitHub, then GitHub Actions may be a good option for testing your projects.
GitHub prepares workflow files for helping people get started with GitHub Actions at https://github.com/actions/starter-workflows/tree/master/ci. Unfortunately they does not provide Perl workflows, but it is not difficult to use GitHub Actions in Perl projects.
So here is an example to use GitHub Actions in Perl projects.
Workflows are defined in
.github/workflows/*.yml and you can see the results via “Actions” tab.
- This sample defines 3 workflows: linux, macos and windows.
- Linux workflow uses docker, and we run tests against various Perl versions.
- We use homebrew and strawberry Perl for macos and windows respectively.
- There already exists msys Perl in windows VM. So if we want to use strawberry Perl, we should append
C:\strawberry\perl\binto PATH before msys directory. For this, I used a special notation
##[add-path]in windows.yml. You should note that, usually such special notations are not used directly, but used via
Perl ❤️ GitHub Actions