Skip to content

Commit

Permalink
new automated tests
Browse files Browse the repository at this point in the history
shamelessly stolen (with slight modifications) from Dual-Life/Scalar-List-Utils
  • Loading branch information
karenetheridge committed Feb 25, 2024
1 parent 1fb6ba2 commit 91c5c7a
Showing 1 changed file with 164 additions and 0 deletions.
164 changes: 164 additions & 0 deletions .github/workflows/testsuite.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,164 @@
name: testsuite

on:
push:
branches:
- "*"
tags-ignore:
- "*"
pull_request:

jobs:

##
## A very light and cheap workflow using the default ubuntu container
## a failure here will block all later workflows
##

ubuntu:
env:
PERL_USE_UNSAFE_INC: 0
AUTHOR_TESTING: 1
AUTOMATED_TESTING: 1
RELEASE_TESTING: 1

runs-on: ubuntu-latest

steps:
- uses: actions/checkout@v3
- run: perl -V
- run: prove -lr t

##
## Test multiple versions of Perl using perl-tester
##

linux:
name: "linux ${{ matrix.perl-version }}"
needs: [ubuntu]
env:
PERL_USE_UNSAFE_INC: 0
AUTHOR_TESTING: 1
AUTOMATED_TESTING: 1
RELEASE_TESTING: 1

runs-on: ubuntu-latest

strategy:
fail-fast: false
matrix:
perl-version:
[
"perl-tester:5.38",
"perl-tester:5.36",
"perl-tester:5.34",
"perl-tester:5.32",
"perl-tester:5.30",
"perl-tester:5.28",
"perl-tester:5.26",
"perl-tester:5.24",
"perl-tester:5.22",
"perl-tester:5.20",
]

container:
image: perldocker/${{ matrix.perl-version }}

steps:
- uses: actions/checkout@v3
- run: perl -V
- name: Makefile.PL
run: perl -I$(pwd) Makefile.PL
- run: make test

##
## Testing on macOS
##

macOS:
needs: [ubuntu, linux]
env:
PERL_USE_UNSAFE_INC: 0
AUTHOR_TESTING: 1
AUTOMATED_TESTING: 1
RELEASE_TESTING: 1

runs-on: macOS-latest

strategy:
fail-fast: false
matrix:
perl-version: [latest]

steps:
- uses: actions/checkout@v3
- run: perl -V
- name: Makefile.PL
run: perl -I$(pwd) Makefile.PL
- run: make test

##
## Testing on windows
##

windows:
needs: [ubuntu, linux]
runs-on: windows-latest

steps:
- uses: actions/checkout@v3
- name: Set up Perl
run: |
choco install strawberryperl
echo 'C:\strawberry\c\bin' >> $GITHUB_PATH
echo 'C:\strawberry\perl\site\bin' >> $GITHUB_PATH
echo 'C:\strawberry\perl\bin' >> $GITHUB_PATH
- run: perl -V
- run: perl Makefile.PL
- run: make
- name: Run Tests
run: make test
env:
AUTHOR_TESTING: 1
RELEASE_TESTING: 1

##
## Testing on windows: using multiple Perl versions
##

# windows:
# name: windows Perl v${{ matrix.perl-version }}
# needs: [ubuntu, linux]
# runs-on: ${{ matrix.os }}
# strategy:
# fail-fast: false
# matrix:
# os: ["windows-latest"]
# perl-version:
# - "5.34"
# - "5.32"
# - "5.30"
# - "5.28"
# - "5.26"
# - "5.24"
# # - "5.22"
# # - "5.20.3"
# # - "5.18.4"
# # - "5.16.3"
# # - "5.14.4"
# # - "5.12.5"
# # - "5.10.1"
# steps:
# - uses: actions/checkout@v3
# - name: Set Up Perl
# uses: shogo82148/[email protected]
# with:
# perl-version: ${{ matrix.perl-version }}
# - run: perl -V
# - run: perl Makefile.PL
# - run: make
# - name: Run Tests
# run: make test
# env:
# AUTHOR_TESTING: 1
# RELEASE_TESTING: 1

0 comments on commit 91c5c7a

Please sign in to comment.