From 8ff777f9d0f583754beb48bd40d5e89e6551147e Mon Sep 17 00:00:00 2001 From: Zakariyya Mughal Date: Sat, 21 Oct 2023 12:23:05 -0400 Subject: [PATCH 1/3] Use shared CI actions --- .github/workflows/ci.yml | 86 ++++++++++++++++++++++++++++++ .github/workflows/issue-notify.yml | 21 ++++++++ 2 files changed, 107 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..8c28d74 --- /dev/null +++ b/.github/workflows/ci.yml @@ -0,0 +1,86 @@ +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: strict # Add modules + 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 ef4cacbbb727bdbc98f6b8fd1c7fc9915767505b Mon Sep 17 00:00:00 2001 From: Zakariyya Mughal Date: Sat, 21 Oct 2023 15:28:28 -0400 Subject: [PATCH 2/3] Comment out minimum Perl job --- .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 8c28d74..35df179 100644 --- a/.github/workflows/ci.yml +++ b/.github/workflows/ci.yml @@ -45,7 +45,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 + #- { os: 'ubuntu-latest', perl: "${{ needs.dist.outputs.min-perl-version }}" } name: Perl ${{ matrix.perl }} on ${{ matrix.os }} steps: From 3bce373984f16d71b8ad4bbf62654b00526f9a34 Mon Sep 17 00:00:00 2001 From: Zakariyya Mughal Date: Sat, 21 Oct 2023 15:44:37 -0400 Subject: [PATCH 3/3] Install RDF::NS specially due to cpanm bug Connects with . --- .github/workflows/ci.yml | 3 +++ 1 file changed, 3 insertions(+) diff --git a/.github/workflows/ci.yml b/.github/workflows/ci.yml index 35df179..e6af029 100644 --- a/.github/workflows/ci.yml +++ b/.github/workflows/ci.yml @@ -70,6 +70,9 @@ jobs: - name: Install Perl deps run: | + # No static install opt-in specifically for RDF::NS. The sharedir + # does not get installed on 5.14 and 5.16 due to . + cpanm --no-static-install --notest RDF::NS cpanm --notest --installdeps . - name: Run tests