Skip to content

Commit dc699fc

Browse files
simbabqueoalders
authored andcommitted
set up github actions
This is almost entirely lifted from WWW::Mechanize
1 parent 8c0b62a commit dc699fc

File tree

2 files changed

+149
-44
lines changed

2 files changed

+149
-44
lines changed

.github/workflows/build-and-test.yml

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

.travis.yml

Lines changed: 0 additions & 44 deletions
This file was deleted.

0 commit comments

Comments
 (0)