Skip to content

Commit

Permalink
Merge branch 'workflow-test'
Browse files Browse the repository at this point in the history
  • Loading branch information
rjbs committed Jun 8, 2024
2 parents f825e3b + 88f50ff commit d904a79
Showing 1 changed file with 4 additions and 80 deletions.
84 changes: 4 additions & 80 deletions .github/workflows/multiperl-test.yml
Original file line number Diff line number Diff line change
Expand Up @@ -5,67 +5,15 @@ on:
tags-ignore: "*"
pull_request: ~

# FUTURE ENHANCEMENT(s):
# * install faster (see below)
# * use github.event.repository.name or ${GITHUB_REPOSITORY#*/} as the
# tarball/build name instead of Dist-To-Test

jobs:
build-tarball:
runs-on: ubuntu-latest
strategy:
fail-fast: false
steps:
- name: Check out repo
uses: actions/checkout@v4
- name: Install cpanminus
run: |
curl https://cpanmin.us/ > /tmp/cpanm
chmod u+x /tmp/cpanm
- name: Install Dist::Zilla
run: sudo apt-get install -y libdist-zilla-perl
- name: Install authordeps
run: |
dzil authordeps --missing > /tmp/deps-phase-1.txt
echo "---BEGIN AUTHORDEPS---"
cat /tmp/deps-phase-1.txt
echo "---END AUTHORDEPS---"
/tmp/cpanm --notest -S < /tmp/deps-phase-1.txt
- name: Upload cpanm logs for authordeps
uses: actions/upload-artifact@v4
with:
name: cpanm-authordeps.log
path: ~/.cpanm/build.log
- name: Install missing prereqs
run: |
dzil listdeps --author --missing > /tmp/deps-phase-2.txt
echo "---BEGIN PREREQS---"
cat /tmp/deps-phase-2.txt
echo "---END PREREQS---"
/tmp/cpanm --notest -S < /tmp/deps-phase-2.txt
- name: Upload cpanm logs for prereqs
uses: actions/upload-artifact@v4
with:
name: cpanm-prereqs.log
path: ~/.cpanm/build.log
- name: Build tarball
run: |
dzil build --in Dist-To-Test
tar zcvf Dist-To-Test.tar.gz Dist-To-Test
- name: Upload tarball
uses: actions/upload-artifact@v4
with:
name: Dist-To-Test.tar.gz
path: Dist-To-Test.tar.gz
- name: Build archive
uses: rjbs/dzil-build@main

multiperl-test:
needs: build-tarball
env:
# some plugins still needs this to run their tests...
PERL_USE_UNSAFE_INC: 0
AUTHOR_TESTING: 1
AUTOMATED_TESTING: 1

runs-on: ubuntu-latest

strategy:
Expand All @@ -77,29 +25,5 @@ jobs:
image: perldocker/perl-tester:${{ matrix.perl-version }}

steps:
- name: Download tarball
uses: actions/download-artifact@v4
with:
name: Dist-To-Test.tar.gz
- name: Extract tarball
run: tar zxvf Dist-To-Test.tar.gz
- name: Install dependencies
working-directory: ./Dist-To-Test
run: cpanm --installdeps --notest .
- name: Makefile.PL
working-directory: ./Dist-To-Test
run: perl Makefile.PL
- name: Install yath
run: cpanm --notest Test2::Harness
- name: Install testing libraries
run: cpanm --notest Test2::Harness::Renderer::JUnit
- name: Run the tests
working-directory: ./Dist-To-Test
run: |
JUNIT_TEST_FILE="/tmp/test-output.xml" ALLOW_PASSING_TODOS=1 yath test --renderer=Formatter --renderer=JUnit -D
- name: Publish test report
uses: mikepenz/action-junit-report@v4
if: always() # always run even if the previous step fails
with:
check_name: JUnit Report (${{ matrix.perl-version }})
report_paths: /tmp/test-output.xml
- name: Test distribution
uses: rjbs/test-perl-dist@main

0 comments on commit d904a79

Please sign in to comment.