Skip to content

Commit

Permalink
Standardise CPAN Actions
Browse files Browse the repository at this point in the history
  • Loading branch information
davorg committed Jan 22, 2024
1 parent 1089cd1 commit ad89692
Showing 1 changed file with 12 additions and 37 deletions.
49 changes: 12 additions & 37 deletions .github/workflows/perltest.yml
Original file line number Diff line number Diff line change
@@ -1,49 +1,24 @@
# This is a basic workflow to help you get started with Actions

name: CI

# Controls when the action will run. Triggers the workflow on push or pull request
# events but only for the master branch
on:
push:
branches: [ master ]
pull_request:
branches: [ master ]
workflow_dispatch:

# A workflow run is made up of one or more jobs that can run sequentially or in parallel
jobs:
build:
runs-on: ${{ matrix.os }}
strategy:
matrix:
os: ['ubuntu-latest', 'macos-latest']
perl: [ 'latest' ]
name: Perl ${{ matrix.perl }} on ${{ matrix.os }}
steps:
- uses: actions/checkout@v4
- name: Set up perl
uses: shogo82148/actions-setup-perl@v1
with:
perl-version: ${{ matrix.perl }}
- run: perl -V
- run: cpanm --installdeps .
- run: prove -lv t
- name: Archive cpan logs
uses: actions/upload-artifact@v4
with:
name: cpan-log
path: /home/runner/.cpan/work/*/build.log
test:
uses: PerlToolsTeam/github_workflows/.github/workflows/cpan-test.yml@main
with:
os: "['ubuntu-latest', 'macos-latest']"
perl_version: "[ 'latest' ]"

coverage:
runs-on: ubuntu-latest
container: davorg/perl-coveralls:latest
name: Test coverage
steps:
- uses: actions/checkout@v4
- name: Install modules
run: cpanm -n --installdeps .
- name: Coverage
env:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
run: cover -test -report Coveralls
uses: PerlToolsTeam/github_workflows/.github/workflows/cpan-perlcritic.yml@main

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

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

0 comments on commit ad89692

Please sign in to comment.