Skip to content

Commit 7e4955f

Browse files
simbabqueoalders
authored andcommitted
add workflow
this is based on libwww-perl's one
1 parent beb0900 commit 7e4955f

File tree

1 file changed

+170
-0
lines changed

1 file changed

+170
-0
lines changed
Lines changed: 170 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,170 @@
1+
---
2+
name: dzil build and test
3+
4+
on:
5+
push:
6+
branches:
7+
- "master"
8+
pull_request:
9+
branches:
10+
- "*"
11+
workflow_dispatch:
12+
13+
jobs:
14+
build-job:
15+
name: Build distribution
16+
runs-on: ubuntu-24.04
17+
container:
18+
image: perldocker/perl-tester:5.40
19+
steps:
20+
- uses: actions/checkout@v4
21+
- name: Run Tests
22+
env:
23+
AUTHOR_TESTING: 1
24+
AUTOMATED_TESTING: 1
25+
EXTENDED_TESTING: 1
26+
RELEASE_TESTING: 1
27+
NO_JIGSAW: 1
28+
run: upgrade-perl-helpers && auto-build-and-test-dist
29+
- uses: actions/upload-artifact@v4
30+
with:
31+
name: build_dir
32+
path: build_dir
33+
coverage-job:
34+
needs: build-job
35+
runs-on: ubuntu-24.04
36+
container:
37+
image: perldocker/perl-tester:5.40
38+
steps:
39+
- uses: actions/checkout@v4 # codecov wants to be inside a Git repository
40+
- uses: actions/download-artifact@v4
41+
with:
42+
name: build_dir
43+
path: .
44+
- name: Install deps and test
45+
run: cpan-install-dist-deps && test-dist
46+
env:
47+
NO_JIGSAW: 1
48+
CODECOV_TOKEN: ${{secrets.CODECOV_TOKEN}}
49+
ubuntu-test-job:
50+
needs: build-job
51+
runs-on: "ubuntu-24.04"
52+
strategy:
53+
fail-fast: true
54+
matrix:
55+
os: [ubuntu-24.04]
56+
perl-version:
57+
- "5.14"
58+
- "5.16"
59+
- "5.18"
60+
- "5.20"
61+
- "5.22"
62+
- "5.24"
63+
- "5.26"
64+
- "5.28"
65+
- "5.30"
66+
- "5.32"
67+
- "5.34"
68+
- "5.36"
69+
- "5.38"
70+
- "5.40"
71+
name: perl ${{ matrix.perl-version }} on ${{ matrix.os }}
72+
steps:
73+
- name: set up perl
74+
uses: shogo82148/actions-setup-perl@v1
75+
with:
76+
perl-version: ${{ matrix.perl-version }}
77+
- uses: actions/download-artifact@v4
78+
with:
79+
name: build_dir
80+
path: .
81+
- name: install deps using cpm
82+
uses: perl-actions/install-with-cpm@v1
83+
with:
84+
cpanfile: "cpanfile"
85+
args: "--with-suggests --with-recommends --with-test"
86+
- name: install sendmail
87+
run: sudo apt-get install -y --no-install-recommends sendmail-bin
88+
- run: prove -lr t
89+
env:
90+
AUTHOR_TESTING: 0
91+
RELEASE_TESTING: 0
92+
NO_JIGSAW: 1
93+
macos-test-job:
94+
needs: build-job
95+
runs-on: "macos-latest"
96+
strategy:
97+
fail-fast: true
98+
matrix:
99+
os: [macos-latest]
100+
perl-version:
101+
- "5.14"
102+
- "5.16"
103+
- "5.18"
104+
- "5.20"
105+
- "5.22"
106+
- "5.24"
107+
- "5.26"
108+
- "5.28"
109+
- "5.30"
110+
- "5.32"
111+
- "5.34"
112+
- "5.36"
113+
- "5.38"
114+
- "5.40"
115+
name: perl ${{ matrix.perl-version }} on ${{ matrix.os }}
116+
steps:
117+
- name: set up perl
118+
uses: shogo82148/actions-setup-perl@v1
119+
with:
120+
perl-version: ${{ matrix.perl-version }}
121+
- uses: actions/download-artifact@v4
122+
with:
123+
name: build_dir
124+
path: .
125+
- name: install deps using cpm
126+
uses: perl-actions/install-with-cpm@v1
127+
with:
128+
cpanfile: "cpanfile"
129+
args: "--with-suggests --with-recommends --with-test"
130+
- run: prove -lr t
131+
env:
132+
AUTHOR_TESTING: 0
133+
RELEASE_TESTING: 0
134+
NO_JIGSAW: 1
135+
windows-test-job:
136+
needs: build-job
137+
runs-on: "windows-latest"
138+
strategy:
139+
fail-fast: true
140+
matrix:
141+
os: [windows-latest]
142+
perl-version:
143+
- "5.18"
144+
- "5.20"
145+
- "5.22"
146+
- "5.24"
147+
- "5.26"
148+
- "5.28"
149+
- "5.30"
150+
name: perl ${{ matrix.perl-version }} on ${{ matrix.os }}
151+
steps:
152+
- name: set up perl
153+
uses: shogo82148/actions-setup-perl@v1
154+
with:
155+
perl-version: ${{ matrix.perl-version }}
156+
distribution: strawberry # this option only used on windows
157+
- uses: actions/download-artifact@v4
158+
with:
159+
name: build_dir
160+
path: .
161+
- name: install deps using cpm
162+
uses: perl-actions/install-with-cpm@v1
163+
with:
164+
cpanfile: "cpanfile"
165+
args: "--with-suggests --with-recommends --with-test"
166+
- run: prove -lr t
167+
env:
168+
AUTHOR_TESTING: 0
169+
RELEASE_TESTING: 0
170+
NO_JIGSAW: 1

0 commit comments

Comments
 (0)