Skip to content

Commit

Permalink
add GitHub actions CI
Browse files Browse the repository at this point in the history
  • Loading branch information
mohawk2 committed Dec 19, 2020
1 parent 66cb7a5 commit 4052439
Showing 1 changed file with 61 additions and 0 deletions.
61 changes: 61 additions & 0 deletions .github/workflows/ci.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,61 @@
name: perl
on:
push:
branches:
- '*'
tags-ignore:
- '*'
pull_request:
jobs:
ubuntu:
runs-on: ${{ matrix.os }}
strategy:
fail-fast: false
matrix:
os: [ubuntu-latest]
perl-version: ['5.10', '5.14', '5.20']
include:
- perl-version: '5.30'
os: ubuntu-latest
release-test: true
coverage: true
container: perl:${{ matrix.perl-version }}
steps:
- uses: actions/checkout@v2
- run: cpanm -n --installdeps .
- run: perl -V
- name: Run release tests # before others as may install useful stuff
if: ${{ matrix.release-test }}
env:
RELEASE_TESTING: 1
run: |
cpanm -n --installdeps --with-develop .
prove -lr xt
- name: Run tests (no coverage)
if: ${{ !matrix.coverage }}
run: perl Makefile.PL && HARNESS_OPTIONS='j4' make test
- name: Run tests (with coverage)
if: ${{ matrix.coverage }}
env:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
run: |
cpanm -n Devel::Cover::Report::Coveralls
HARNESS_OPTIONS='j4' cover -test -report Coveralls
non-linux:
runs-on: ${{ matrix.os }}
strategy:
fail-fast: false
matrix:
os: [macos-latest, windows-latest]
steps:
- uses: actions/checkout@v2
- uses: shogo82148/actions-setup-perl@v1
with:
distribution: strawberry # ignored non-windows
- uses: perl-actions/install-with-cpanm@v1
with:
args: -n --installdeps .
sudo: false
- run: perl -V
- run: perl Makefile.PL
- run: make test

0 comments on commit 4052439

Please sign in to comment.