From e5973519a754629c28d2167939b5765c040a5f2e Mon Sep 17 00:00:00 2001 From: Zakariyya Mughal Date: Sat, 21 Oct 2023 12:23:05 -0400 Subject: [PATCH 1/5] Use shared CI actions --- .github/workflows/ci.yml | 92 ++++++++++++++++++++++++++++++ .github/workflows/issue-notify.yml | 21 +++++++ 2 files changed, 113 insertions(+) create mode 100644 .github/workflows/ci.yml create mode 100644 .github/workflows/issue-notify.yml diff --git a/.github/workflows/ci.yml b/.github/workflows/ci.yml new file mode 100644 index 0000000..419b7c0 --- /dev/null +++ b/.github/workflows/ci.yml @@ -0,0 +1,92 @@ +name: Run Tests + +on: + workflow_dispatch: + push: + branches: + - '*' + tags-ignore: + - '*' + pull_request: + create: + +jobs: + notify: + runs-on: ubuntu-latest + continue-on-error: true + if: ${{ always() }} + steps: + - uses: perlrdf/devops/github-actions/irc-notifications@main + with: + target-notifications: true + dist: + if: ${{ github.event_name == 'push' || github.event_name == 'pull_request' }} + name: Make distribution + runs-on: ubuntu-latest + outputs: + min-perl-version: ${{ steps.build-dist.outputs.min-perl-version }} + steps: + - name: Checkout code + uses: actions/checkout@v3 + - id: build-dist + uses: perlrdf/devops/github-actions/build-dist@main + with: + dist-perl-deps-develop: >- + Attean + Test::Signature + Test::Perl::Critic + Test::Pod::Coverage + Test::Pod + Pod::Coverage::Moose + test: + needs: [ 'dist', 'notify' ] + runs-on: ${{ matrix.os }} + strategy: + matrix: + os: [macos-latest, windows-latest, ubuntu-latest] + perl: ['5'] + include: + - { os: 'ubuntu-latest', perl: "5.32" } + - { os: 'ubuntu-latest', perl: "5.30" } + - { os: 'ubuntu-latest', perl: "5.20" } + - { os: 'ubuntu-latest', perl: "5.16" } + - { os: 'ubuntu-latest', perl: "5.14" } + - { os: 'ubuntu-latest', perl: "${{ needs.dist.outputs.min-perl-version }}" } + name: Perl ${{ matrix.perl }} on ${{ matrix.os }} + + steps: + - name: Get dist artifact + uses: actions/download-artifact@v3 + with: + name: dist + + - name: Set up perl + uses: shogo82148/actions-setup-perl@v1 + if: matrix.os != 'windows-latest' + with: + perl-version: ${{ matrix.perl }} + - name: Set up perl (Strawberry) + uses: shogo82148/actions-setup-perl@v1 + if: matrix.os == 'windows-latest' + with: + distribution: 'strawberry' + + - run: perl -V + + - name: Install Perl deps + run: | + cpanm --notest --installdeps . + + - name: Run tests + run: | + cpanm --verbose --test-only . + build-status: + runs-on: ubuntu-latest + continue-on-error: true + if: ${{ always() }} + needs: test + steps: + - uses: perlrdf/devops/github-actions/irc-notifications@main + with: + target-build-status: true + needs: ${{ toJSON(needs) }} diff --git a/.github/workflows/issue-notify.yml b/.github/workflows/issue-notify.yml new file mode 100644 index 0000000..1511a78 --- /dev/null +++ b/.github/workflows/issue-notify.yml @@ -0,0 +1,21 @@ +name: issue-notify + +on: + issues: + types: [opened,assigned,closed,reopened] + issue_comment: + types: [created] + pull_request: + types: [closed,assigned,converted_to_draft,ready_for_review,review_requested] + pull_request_review: + types: [submitted] + +jobs: + notify: + runs-on: ubuntu-latest + continue-on-error: true + if: ${{ always() }} + steps: + - uses: perlrdf/devops/github-actions/irc-notifications@main + with: + target-notifications: true From d87f4953261a82f894a9b9fb0adc97424ca2adef Mon Sep 17 00:00:00 2001 From: Zakariyya Mughal Date: Sat, 21 Oct 2023 15:21:49 -0400 Subject: [PATCH 2/5] Fix people metadata --- meta/people.pret | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/meta/people.pret b/meta/people.pret index ac2abf7..81fbb96 100644 --- a/meta/people.pret +++ b/meta/people.pret @@ -6,5 +6,7 @@ cpan:KJETILK :name "Kjetil Kjernsmo"; - owl:sameAs result:user-Kjetil Kjernsmo. + :page ; + :mbox ; + owl:sameAs , result:user-Kjetil-Kjernsmo . From 4f93022d65cb570b133b24ada346e8c60339c47d Mon Sep 17 00:00:00 2001 From: Zakariyya Mughal Date: Sat, 21 Oct 2023 15:40:15 -0400 Subject: [PATCH 3/5] Minimum due to Attean is Perl 5.14 --- .github/workflows/ci.yml | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/.github/workflows/ci.yml b/.github/workflows/ci.yml index 419b7c0..35138d7 100644 --- a/.github/workflows/ci.yml +++ b/.github/workflows/ci.yml @@ -51,7 +51,8 @@ jobs: - { os: 'ubuntu-latest', perl: "5.20" } - { os: 'ubuntu-latest', perl: "5.16" } - { os: 'ubuntu-latest', perl: "5.14" } - - { os: 'ubuntu-latest', perl: "${{ needs.dist.outputs.min-perl-version }}" } + # Not testing this for now due to Attean (requires Perl 5.14) + #- { os: 'ubuntu-latest', perl: "${{ needs.dist.outputs.min-perl-version }}" } name: Perl ${{ matrix.perl }} on ${{ matrix.os }} steps: From 62600516e69986b2676e69a96bf1cf52494cead1 Mon Sep 17 00:00:00 2001 From: Zakariyya Mughal Date: Sat, 21 Oct 2023 15:49:07 -0400 Subject: [PATCH 4/5] Add skip_whitespace_test option --- dist.ini | 1 + 1 file changed, 1 insertion(+) diff --git a/dist.ini b/dist.ini index b530d1f..42a4d74 100644 --- a/dist.ini +++ b/dist.ini @@ -1,3 +1,4 @@ ;;class='Dist::Inkt::Profile::TOBYINK' ;;name='Test-EARL-Reports' +;;skip_whitespace_test=1 From 61b6bff69e3f1613dc80461367d2f30d52d93bda Mon Sep 17 00:00:00 2001 From: Zakariyya Mughal Date: Sat, 21 Oct 2023 15:58:11 -0400 Subject: [PATCH 5/5] Critic fix - Code not contained in explicit package --- lib/Test/EARL/Reports.pm | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/lib/Test/EARL/Reports.pm b/lib/Test/EARL/Reports.pm index e033ef6..e807cb6 100644 --- a/lib/Test/EARL/Reports.pm +++ b/lib/Test/EARL/Reports.pm @@ -1,8 +1,8 @@ +package Test::EARL::Reports; use 5.010001; use strict; use warnings; -package Test::EARL::Reports; use Attean; use Attean::RDF qw(iri); use Moo;