Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Prep before publishing action #3

Merged
merged 18 commits into from
Apr 27, 2024
Merged
Show file tree
Hide file tree
Changes from 17 commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
The table of contents is too big for display.
Diff view
Diff view
  •  
  •  
  •  
106 changes: 106 additions & 0 deletions .github/workflows/check.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,106 @@
name: "Check Workflow"

on: [push, pull_request]

jobs:

perl-versions:
runs-on: ubuntu-latest
name: 'perl-versions default'
outputs:
perl-versions: ${{ steps.action.outputs.perl-versions }}
steps:
- uses: actions/checkout@v4
- name: "uses perl-versions"
id: action
uses: ./

since-v520:
runs-on: ubuntu-latest
name: 'since v5.20'
outputs:
perl-versions: ${{ steps.action.outputs.perl-versions }}
steps:
- uses: actions/checkout@v4
- name: "uses perl-versions"
id: action
uses: ./
with:
since-perl: v5.20

since-520:
atoomic marked this conversation as resolved.
Show resolved Hide resolved
runs-on: ubuntu-latest
name: 'since 5.20'
outputs:
perl-versions: ${{ steps.action.outputs.perl-versions }}
steps:
- uses: actions/checkout@v4
- name: "uses perl-versions"
id: action
uses: ./
with:
since-perl: "5.20"

since-536-with-devel:
runs-on: ubuntu-latest
name: 'since 5.36 with devel'
outputs:
perl-versions: ${{ steps.action.outputs.perl-versions }}
steps:
- uses: actions/checkout@v4
- name: "uses perl-versions"
id: action
uses: ./
with:
since-perl: 5.36
with-devel: true

test-matrix:
runs-on: ubuntu-latest
needs:
- since-536-with-devel
strategy:
fail-fast: false
matrix:
perl-versions: ${{ fromJson (needs.since-536-with-devel.outputs.perl-versions) }}
steps:
- run: echo "Hello"

perl-tester:
runs-on: ubuntu-latest
needs:
- since-536-with-devel
name: "Perl ${{ matrix.perl-version }}"
strategy:
fail-fast: false
matrix:
perl-version: ${{ fromJson (needs.since-536-with-devel.outputs.perl-versions) }}
container:
image: perldocker/perl-tester:${{ matrix.perl-version }}
Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

fyi, perl-versions are used to publish perl-tester docker images, so upcoming v5.40 will be first added here and perl-tester:5.40 will exist later

Copy link
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

yeap I was expecting such addition in a few days, but looks like we control the list manually and at the same time we are adding it we should now also add it to the poor man test I ve added there, should be ok I think?

Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

hm, let's see, we can fix issues later
workflow I have growing in my mind is:

  • test version validity using authority list (probably reusing perlbrew available)
  • trigger perl-tester publish workflow when new version is added

Copy link
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

definitively good improvements we can add in a short future!
I'm trying to get that pipeline ready for release so we can start using it in multiple distro

Let me know if you are fine with the current state before merging
thanks

steps:
- uses: actions/checkout@v4
- run: perl -V

check:
needs:
- perl-versions
- since-v520
- since-520
- since-536-with-devel
runs-on: ubuntu-latest
steps:
- name: "Testing perl-versions"
run: |
[[ '${{ needs.perl-versions.outputs.perl-versions }}' == '["5.14","5.16","5.18","5.20","5.22","5.24","5.26","5.28","5.30","5.32","5.34","5.36","5.38"]' ]] && echo "ok"

- name: "Testing since-v520"
run: |
[[ '${{ needs.since-v520.outputs.perl-versions }}' == '["5.20","5.22","5.24","5.26","5.28","5.30","5.32","5.34","5.36","5.38"]' ]] && echo "ok"

- name: "Testing since-520"
run: |
[[ '${{ needs.since-520.outputs.perl-versions }}' == '["5.20","5.22","5.24","5.26","5.28","5.30","5.32","5.34","5.36","5.38"]' ]] && echo "ok"

- name: "Testing since-536-with-devel"
run: |
[[ '${{ needs.since-536-with-devel.outputs.perl-versions }}' == '["5.36","5.38","devel"]' ]] && echo "ok"
1 change: 1 addition & 0 deletions .gitignore
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
/node_modules/
27 changes: 18 additions & 9 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -25,26 +25,35 @@ if available.

## Usage

```
```yaml
jobs:
perl-versions:
runs-on: ubuntu-latest
name: List perl versions
name: List Perl versions
outputs:
perl-versions: ${{ steps.action.outputs.perl-versions }}
steps:
- name: Perl versions action step
id: action
uses: happy-barney/github-workflows/perl-versions@main
- id: action
uses: perl-actions/perl-versions@v1
with:
since-perl: "v5.20"
since-perl: v5.20

##
## Using perl-versions with perl-tester
##
test:
needs:
- perl-versions
name: "Perl ${{ matrix.perl-version }}"
strategy:
fail-fast: false
matrix:
perl-versions: ${{ fromJson (needs.perl-versions.outputs.perl-versions) }}
container:
image: perldocker/perl-tester:${{ matrix.perl-version }}
steps:
- uses: actions/checkout@v4
- run: perl -V

```

Expand All @@ -66,12 +75,12 @@ String containing JSON array with list of Perl versions.

## Usage

```
```yaml
jobs:
perl-versions:
uses: perl-actions/perl-versions/.github/workflows/perl-versions.yml@main
uses: perl-actions/perl-versions@v1
with:
since-perl: 5.10
since-perl: "5.14"

test:
needs:
Expand Down
6 changes: 3 additions & 3 deletions action.yml
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@ inputs:
since-perl:
description: "List all Perl versions since this (including this). Example: 5.10"
type: string
required: true
default: "5.14"
atoomic marked this conversation as resolved.
Show resolved Hide resolved
with-devel:
description: "Whether to include also 'devel' Perl"
type: boolean
Expand All @@ -13,5 +13,5 @@ outputs:
perl-versions:
description: "JSON containing list of perl versions"
runs:
using: node16
main: perl-versions.js
using: "node20"
main: "dist/index.js"
Loading