PerlToolsTeam / github_workflows

Some useful (and reusable) GitHub Workflows
GNU General Public License v3.0
12 stars 0 forks source link
cpan github hacktoberfest perl workflows

GitHub Workflows

A collection of GitHub workflows to use for Perl development

Workflows

Beta test

These workflows seem to work as expected. There probably won't be any major changes to them (but there will, almost certainly, be new features and bug fixes).

cpan-test

Runs the standard Perl testing framework

Inputs:

Note: GitHub Actions currently doesn't support lists as inputs to callable workflows. We work around this by passing a string containing a JSON-encoded list which is decoded in the workflow. You can see the format of these lists from their default values:

Note: The cpan-test workflow now includes configure steps to run perl Build.PL if Build.PL exists, and perl Makefile.PL if Makefile.PL exists, before running prove.

Todo

cpan-coverage

Checks the test coverage for your Perl code and reports the results to Coveralls.io

Todo

cpan-perlcritic

Runs perlcritic against your Perl code

Inputs:

In early development

These workflows aren't guaranteed to do what they need to yet. They'll probably change quickly over the coming weeks, so maybe don't use them just yet.

cpan-release

Releases a Perl distribution to CPAN

cpan-dzil-test

Runs the standard DistZilla testing framework

Thinking about it

All bets are off with these workflows. I mean, you can try them but I'm giving no guarantees whatsoever.

cpan-kwality

Test the "Kwality" of your Perl code

cpan-complexity

Report on the cyclomatic complexity of your code

Using the workflows

These workflows have all been written so that you can simply refer to them from within your own workflows. For example, a simple workflow that runs the CPAN test, coverage and perlcritic workflows would look like this:

name: CI

on:
  push:
    branches: [ main ]
  pull_request:
    branches: [ main ]
  workflow_dispatch:

jobs:
  test:
    uses: PerlToolsTeam/github_workflows/.github/workflows/cpan-test.yml@main

  coverage:
    uses: PerlToolsTeam/github_workflows/.github/workflows/cpan-coverage.yml@main

  perlcritic:
    uses: PerlToolsTeam/github_workflows/.github/workflows/cpan-perlcritic.yml@main