Skip to content

Commit 22d1146

Browse files
authored
Merge pull request #20 from happy-barney/hpb/actionify
Expose tester helpers as github actions as well
2 parents 1e41dcd + b4ad0d1 commit 22d1146

File tree

6 files changed

+87
-0
lines changed

6 files changed

+87
-0
lines changed

README.md

Lines changed: 45 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -45,3 +45,48 @@ curl https://raw.githubusercontent.com/perl-actions/ci-perl-tester-helpers/maste
4545
# Linting
4646

4747
You can lint this project locally via `precious lint --all`
48+
49+
# Github Actions
50+
51+
Commands are also available as github actions:
52+
```
53+
job:
54+
linux:
55+
...
56+
steps:
57+
...
58+
- uses: perl-actions/ci-perl-tester-helpers/install-test-helper-deps@main
59+
- uses: perl-actions/ci-perl-tester-helpers/cpan-install-build-deps@main
60+
- uses: perl-actions/ci-perl-tester-helpers/build-dist@main
61+
- uses: perl-actions/ci-perl-tester-helpers/cpan-install-dist-deps@main
62+
- uses: perl-actions/ci-perl-tester-helpers/test-dist@main
63+
env:
64+
AUTHOR_TESTING: 1
65+
```
66+
67+
## perl-actions/ci-perl-tester-helpers/build-dist@master
68+
69+
Build your distribution detecting what framework you are using.
70+
71+
## perl-actions/ci-perl-tester-helpers/cpan-install-build-deps@master
72+
73+
Install build dependencies (eg: dzil modules referenced in your `dist.ini`)
74+
75+
## perl-actions/ci-perl-tester-helpers/cpan-install-dist-deps@master
76+
77+
Install dependencies of your distribution.
78+
79+
## perl-actions/ci-perl-tester-helpers/install-helpers-deps@master
80+
81+
Install dependencies required by ci-perl-tester-helpers
82+
83+
- `cpm` - required version min `0.997014`
84+
85+
## perl-actions/ci-perl-tester-helpers/test-dist@master
86+
87+
Tests your distribution using `prove` with `--state save`.
88+
89+
Recognizes env variables:
90+
91+
- `AUTHOR_TESTING`
92+
If set to `1`, includes tests in `xt` directory (if available)

build-dist/action.yml

Lines changed: 8 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,8 @@
1+
---
2+
name: 'Build distribution'
3+
description: 'Build distribution, automatically detecting how'
4+
runs:
5+
using: "composite"
6+
steps:
7+
- run: $GITHUB_ACTION_PATH/../bin/build-dist
8+
shell: bash

cpan-install-build-deps/action.yml

Lines changed: 8 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,8 @@
1+
---
2+
name: 'Install build dependencies from CPAN'
3+
description: 'Install build dependencies from CPAN'
4+
runs:
5+
using: "composite"
6+
steps:
7+
- run: $GITHUB_ACTION_PATH/../bin/cpan-install-build-deps
8+
shell: bash

cpan-install-dist-deps/action.yml

Lines changed: 8 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,8 @@
1+
---
2+
name: 'Install distribution dependencies from CPAN'
3+
description: 'Install distribution dependencies from CPAN'
4+
runs:
5+
using: "composite"
6+
steps:
7+
- run: $GITHUB_ACTION_PATH/../bin/cpan-install-dist-deps
8+
shell: bash
Lines changed: 10 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,10 @@
1+
---
2+
name: 'Install test helpers dependencies'
3+
description: 'Install test helpers dependencies'
4+
runs:
5+
using: "composite"
6+
steps:
7+
- shell: bash
8+
run: |
9+
# we need cpm with --metafile support
10+
wget https://raw.githubusercontent.com/skaji/cpm/main/cpm > /usr/local/bin/cpm

test-dist/action.yml

Lines changed: 8 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,8 @@
1+
---
2+
name: 'Test distribution'
3+
description: 'Test distribution'
4+
runs:
5+
using: "composite"
6+
steps:
7+
- run: $GITHUB_ACTION_PATH/../bin/test-dist
8+
shell: bash

0 commit comments

Comments
 (0)