Run tests via github actions
Shamelessly adapted from Lab::Measurement
This commit is contained in:
parent
15b392e555
commit
782c1d09d4
28
.github/scripts/prove-test.bash
vendored
Executable file
28
.github/scripts/prove-test.bash
vendored
Executable file
@ -0,0 +1,28 @@
|
||||
# Stop script on first error
|
||||
set -o errexit
|
||||
|
||||
# Prevent "Please tell me who you are" errors for certain DZIL configs
|
||||
git config --global user.name 'github-actions'
|
||||
|
||||
# check perl version
|
||||
perl --version
|
||||
|
||||
#
|
||||
# Install Dist::Zilla and module dependencies
|
||||
#
|
||||
|
||||
cpanm -n Dist::Zilla
|
||||
|
||||
# Install DZIL plugins etc if needed
|
||||
cd $GITHUB_WORKSPACE
|
||||
dzil authordeps --missing | grep -vP '[^\w:]' | xargs cpanm -n
|
||||
dzil listdeps --missing --cpanm | grep -vP '[^\w:~"\.]' | xargs cpanm -n
|
||||
|
||||
# dependencies of module tests
|
||||
cpanm -n HTTP::Server::Simple
|
||||
|
||||
#
|
||||
# Run tests (user tests as well as maintainer tests)
|
||||
#
|
||||
|
||||
prove --verbose -l -s -r t xt
|
21
.github/workflows/test.yml
vendored
Normal file
21
.github/workflows/test.yml
vendored
Normal file
@ -0,0 +1,21 @@
|
||||
name: test
|
||||
on: [push]
|
||||
jobs:
|
||||
'prove-lrt':
|
||||
runs-on: ubuntu-latest
|
||||
strategy:
|
||||
matrix:
|
||||
perl: ['5.24', '5.26', '5.28', '5.30', '5.32', '5.34']
|
||||
steps:
|
||||
- uses: actions/checkout@v2
|
||||
- uses: actions/setup-node@v2
|
||||
- uses: shogo82148/actions-setup-perl@v1
|
||||
with:
|
||||
perl-version: ${{matrix.perl}}
|
||||
- run: lsb_release -a
|
||||
|
||||
# run test in script to avoid tedious quoting of bash code
|
||||
- name: prove-test
|
||||
run: ./.github/scripts/prove-test.bash
|
||||
shell: bash
|
||||
|
Loading…
x
Reference in New Issue
Block a user