Perl meets GitHub Actions

Shoichi Kaji
1 min readSep 16, 2019

--

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.

https://github.com/skaji/perl-github-actions-sample

Workflows are defined in .github/workflows/*.yml and you can see the results via “Actions” tab.

Some remarks:

  • 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\bin to 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 actions/core package.

Perl ❤️ GitHub Actions

--

--