Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Add CI to build tarball and run tests #6

Open
wants to merge 1 commit into
base: master
Choose a base branch
from
Open
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
78 changes: 78 additions & 0 deletions .github/workflows/actions.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,78 @@
on: [push, pull_request]

jobs:
unit-test:
needs: build
runs-on: ${{ matrix.os }}
strategy:
matrix:
os: ['ubuntu-latest', 'macos-latest']
perl: [ '5.36', '5.30' ]
max-parallel: 3
name: Perl unit tests ${{ matrix.perl }} on ${{ matrix.os }}

steps:
- name: Grab release tarball
uses: actions/download-artifact@v1
with:
name: release-tarball
- run: tar xzf release-tarball/ar.tar.gz --strip 1
- name: Set up perl
uses: shogo82148/[email protected]
with:
perl-version: ${{ matrix.perl }}
- run: perl -V
- run: cpanm --quiet --notest --installdeps .
- run: perl Makefile.PL
- run: make
- run: make test

strawberry-unit-test:
needs: build
runs-on: ${{ matrix.os }}
strategy:
matrix:
os: ['windows-latest']
perl: [ '5.30.2.1', '5.28.2.1' ]
arch: ['64bit']
max-parallel: 3
name: Strawberry Perl unit tests on ${{ matrix.os }} with ${{ matrix.arch }} perl ${{ matrix.perl }}

steps:
- name: Grab release tarball
uses: actions/download-artifact@v1
with:
name: release-tarball
- run: tar xzf release-tarball/ar.tar.gz --strip 1
- run: Invoke-WebRequest -Uri http://strawberryperl.com/download/${{ matrix.perl }}/strawberry-perl-${{ matrix.perl }}-${{ matrix.arch }}.msi -OutFile c:\strawberry-perl-${{ matrix.perl }}-${{ matrix.arch }}.msi
- run: Start-Process msiexec.exe -Wait -ArgumentList '/I C:\strawberry-perl-${{ matrix.perl }}-${{ matrix.arch }}.msi /quiet'
- run: perl -V
- run: cpanm --quiet --notest --installdeps .
- run: perl Makefile.PL
- run: make
- run: make test

build:
runs-on: ${{ matrix.os }}
strategy:
matrix:
os: ['ubuntu-latest']
perl: [ '5.30' ]
max-parallel: 2
name: CPAN build ${{ matrix.perl }} on ${{ matrix.os }}

steps:
- uses: actions/checkout@v2
- name: Set up perl
uses: shogo82148/[email protected]
with:
perl-version: ${{ matrix.perl }}
- run: perl -V
- run: cpanm --quiet --notest Dist::Zilla
- run: dzil authordeps | cpanm --quiet --notest
- run: dzil build
- run: mv MooseX-Types-ISO8601-*.tar.gz ar.tar.gz
- uses: actions/upload-artifact@v2
with:
path: ar.tar.gz
name: release-tarball