Perl meets GitHub Actions

Shoichi Kaji
Sep 16, 2019 · 1 min read

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

Welcome to a place where words matter. On Medium, smart voices and original ideas take center stage - with no ads in sight. Watch
Follow all the topics you care about, and we’ll deliver the best stories for you to your homepage and inbox. Explore
Get unlimited access to the best stories on Medium — and support writers while you’re at it. Just $5/month. Upgrade