Skip to content

Commit

Permalink
Added GitHub Actions
Browse files Browse the repository at this point in the history
  • Loading branch information
nigelhorne committed Nov 14, 2020
1 parent 0c7c23e commit 10d67ce
Show file tree
Hide file tree
Showing 4 changed files with 66 additions and 4 deletions.
29 changes: 29 additions & 0 deletions .github/workflows/all.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,29 @@
on:
push:
branches:
- '*'
tags-ignore:
- '*'
pull_request:
jobs:
build:
runs-on: ${{ matrix.os }}
strategy:
matrix:
os: ['windows-latest', 'macos-latest', 'ubuntu-latest']
perl: [ '5.30', '5.28' ]
name: Perl ${{ matrix.perl }} on ${{ matrix.os }}
steps:
- uses: actions/checkout@v1
- name: Setup perl
uses: shogo82148/actions-setup-perl@v1
with:
perl-version: ${{ matrix.perl }}
- run: perl -V
- name: Install Dependencies
run: |
cpanm -iq File::Spec ExtUtils::MakeMaker
cpanm -q -n Test::Script Test::Pod::Spelling::CommonMistakes Test::Portability::Files Test::Taint Test::Carp Test::Pod::Coverage
cpanm -iq --installdeps --notest .
- name: Run Tests
run: prove -l -b t
24 changes: 20 additions & 4 deletions .travis.yml
Original file line number Diff line number Diff line change
@@ -1,28 +1,41 @@
---
language: perl

os:
- linux
# - osx

env: AUTOMATED_TESTING=1
arch:
- amd64
- ppc64le
- s390x
# - arm64 # Gets 404 error

env:
- AUTOMATED_TESTING=1
- PERL_CPANM_OPT="--notest --force --skip-satisfied"

perl:
- "5.30"
- "5.28"
# - "5.28" # Travis gets 404 errors trying to find some older perls
- "5.26"
- "5.24"
- "5.22"
# - "5.22"
# - "5.20"
# - "5.18"
# - "5.16"
# - "5.14"
# - "5.12"
# - "5.10"
# - "5.8"
# - "5.8.7"

sudo: false

before_install:
# - sudo apt-get update -q
# - sudo apt-get install sqlite3 libdbi-perl libdbd-sqlite3-perl
- cpanm -v -n Devel::Cover::Report::Coveralls Test::Pod::Spelling::CommonMistakes Test::Portability::Files
- cpanm -v -n Devel::Cover::Report::Coveralls Test::Pod::Spelling::CommonMistakes Test::Portability::Files Test::Pod::Coverage

install:
- cpanm -v --installdeps --notest .
Expand All @@ -44,3 +57,6 @@ jobs:
- perl Makefile.PL
- gmake
- gmake test

after_failure:
- cat /home/travis/.cpanm/work/*/build.log
1 change: 1 addition & 0 deletions MANIFEST
Original file line number Diff line number Diff line change
Expand Up @@ -15,3 +15,4 @@ t/no404s.t
t/pfopen.t
t/pod-cm.t
t/pod.t
t/vars.t
16 changes: 16 additions & 0 deletions t/vars.t
Original file line number Diff line number Diff line change
@@ -0,0 +1,16 @@
#!/usr/bin/env perl

use strict;
use warnings;

use Test::Most;

if(not $ENV{AUTHOR_TESTING}) {
plan(skip_all => 'Author tests not required for installation');
}

eval 'use Test::Vars';

plan(skip_all => 'Test::Vars required for detecting unused variables') if $@;

all_vars_ok(ignore_vars => { '$self' => 0 });

0 comments on commit 10d67ce

Please sign in to comment.