diff --git a/.github/workflows/actions.yml b/.github/workflows/actions.yml new file mode 100644 index 0000000..40352fd --- /dev/null +++ b/.github/workflows/actions.yml @@ -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/actions-setup-perl@v1.17.0 + 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/actions-setup-perl@v1.17.0 + 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