From 4052439c2f38df4d22d6dd461ebe88dd5ffd6de8 Mon Sep 17 00:00:00 2001 From: Ed J Date: Sat, 19 Dec 2020 20:45:57 +0000 Subject: [PATCH] add GitHub actions CI --- .github/workflows/ci.yml | 61 ++++++++++++++++++++++++++++++++++++++++ 1 file changed, 61 insertions(+) create mode 100644 .github/workflows/ci.yml diff --git a/.github/workflows/ci.yml b/.github/workflows/ci.yml new file mode 100644 index 0000000..0f4ebbf --- /dev/null +++ b/.github/workflows/ci.yml @@ -0,0 +1,61 @@ +name: perl +on: + push: + branches: + - '*' + tags-ignore: + - '*' + pull_request: +jobs: + ubuntu: + runs-on: ${{ matrix.os }} + strategy: + fail-fast: false + matrix: + os: [ubuntu-latest] + perl-version: ['5.10', '5.14', '5.20'] + include: + - perl-version: '5.30' + os: ubuntu-latest + release-test: true + coverage: true + container: perl:${{ matrix.perl-version }} + steps: + - uses: actions/checkout@v2 + - run: cpanm -n --installdeps . + - run: perl -V + - name: Run release tests # before others as may install useful stuff + if: ${{ matrix.release-test }} + env: + RELEASE_TESTING: 1 + run: | + cpanm -n --installdeps --with-develop . + prove -lr xt + - name: Run tests (no coverage) + if: ${{ !matrix.coverage }} + run: perl Makefile.PL && HARNESS_OPTIONS='j4' make test + - name: Run tests (with coverage) + if: ${{ matrix.coverage }} + env: + GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }} + run: | + cpanm -n Devel::Cover::Report::Coveralls + HARNESS_OPTIONS='j4' cover -test -report Coveralls + non-linux: + runs-on: ${{ matrix.os }} + strategy: + fail-fast: false + matrix: + os: [macos-latest, windows-latest] + steps: + - uses: actions/checkout@v2 + - uses: shogo82148/actions-setup-perl@v1 + with: + distribution: strawberry # ignored non-windows + - uses: perl-actions/install-with-cpanm@v1 + with: + args: -n --installdeps . + sudo: false + - run: perl -V + - run: perl Makefile.PL + - run: make test