Skip to content

Commit 5e5b6ca

Browse files
committed
Replace Travis with GitHub Workflows
1 parent 5ffb78e commit 5e5b6ca

File tree

2 files changed

+165
-52
lines changed

2 files changed

+165
-52
lines changed
Lines changed: 165 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,165 @@
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-20.04
18+
container:
19+
image: perldocker/perl-tester:5.32
20+
steps:
21+
- uses: actions/checkout@v2
22+
- name: Run Tests
23+
env:
24+
AUTHOR_TESTING: 1
25+
AUTOMATED_TESTING: 1
26+
EXTENDED_TESTING: 1
27+
RELEASE_TESTING: 1
28+
run: auto-build-and-test-dist
29+
- uses: actions/upload-artifact@v2
30+
with:
31+
name: build_dir
32+
path: build_dir
33+
if: ${{ github.actor != 'nektos/act' }}
34+
coverage-job:
35+
needs: build-job
36+
runs-on: ubuntu-20.04
37+
container:
38+
image: perldocker/perl-tester:5.32
39+
steps:
40+
- uses: actions/checkout@v2 # codecov wants to be inside a Git repository
41+
- uses: actions/download-artifact@v2
42+
with:
43+
name: build_dir
44+
path: .
45+
- name: Install deps and test
46+
run: cpan-install-dist-deps && test-dist
47+
env:
48+
CODECOV_TOKEN: ${{secrets.CODECOV_TOKEN}}
49+
ubuntu-test-job:
50+
needs: build-job
51+
runs-on: "ubuntu-latest"
52+
strategy:
53+
fail-fast: true
54+
matrix:
55+
os: [ubuntu-20.04]
56+
perl-version:
57+
- "5.8"
58+
- "5.10"
59+
- "5.12"
60+
- "5.14"
61+
- "5.16"
62+
- "5.18"
63+
- "5.20"
64+
- "5.22"
65+
- "5.24"
66+
- "5.26"
67+
- "5.28"
68+
- "5.30"
69+
- "5.32"
70+
name: perl ${{ matrix.perl-version }} on ${{ matrix.os }}
71+
steps:
72+
- name: set up perl
73+
uses: shogo82148/actions-setup-perl@v1
74+
with:
75+
perl-version: ${{ matrix.perl-version }}
76+
- uses: actions/download-artifact@v2
77+
with:
78+
name: build_dir
79+
path: .
80+
- name: install deps using cpm
81+
uses: perl-actions/install-with-cpm@v1
82+
with:
83+
cpanfile: "cpanfile"
84+
args: "--with-suggests --with-recommends --with-test --with-develop"
85+
- run: prove -lrv t xt
86+
env:
87+
AUTHOR_TESTING: 1
88+
RELEASE_TESTING: 1
89+
macos-test-job:
90+
needs: ubuntu-test-job
91+
runs-on: "macos-latest"
92+
strategy:
93+
fail-fast: true
94+
matrix:
95+
os: [macos-latest]
96+
perl-version:
97+
- "5.8"
98+
- "5.10"
99+
- "5.12"
100+
- "5.14"
101+
- "5.16"
102+
- "5.18"
103+
- "5.20"
104+
- "5.22"
105+
- "5.24"
106+
- "5.26"
107+
- "5.28"
108+
- "5.30"
109+
- "5.32"
110+
name: perl ${{ matrix.perl-version }} on ${{ matrix.os }}
111+
steps:
112+
- name: set up perl
113+
uses: shogo82148/actions-setup-perl@v1
114+
with:
115+
perl-version: ${{ matrix.perl-version }}
116+
- uses: actions/download-artifact@v2
117+
with:
118+
name: build_dir
119+
path: .
120+
- name: install deps using cpm
121+
uses: perl-actions/install-with-cpm@v1
122+
with:
123+
cpanfile: "cpanfile"
124+
args: "--with-suggests --with-recommends --with-test --with-develop"
125+
- run: prove -lrv t xt
126+
env:
127+
AUTHOR_TESTING: 1
128+
RELEASE_TESTING: 1
129+
windows-test-job:
130+
needs: ubuntu-test-job
131+
runs-on: "windows-latest"
132+
strategy:
133+
fail-fast: true
134+
matrix:
135+
os: [windows-latest]
136+
perl-version:
137+
- "5.14"
138+
- "5.16"
139+
- "5.18"
140+
- "5.20"
141+
- "5.22"
142+
- "5.24"
143+
- "5.26"
144+
- "5.28"
145+
- "5.30"
146+
name: perl ${{ matrix.perl-version }} on ${{ matrix.os }}
147+
steps:
148+
- name: set up perl
149+
uses: shogo82148/actions-setup-perl@v1
150+
with:
151+
perl-version: ${{ matrix.perl-version }}
152+
distribution: strawberry # this option only used on windows
153+
- uses: actions/download-artifact@v2
154+
with:
155+
name: build_dir
156+
path: .
157+
- name: install deps using cpm
158+
uses: perl-actions/install-with-cpm@v1
159+
with:
160+
cpanfile: "cpanfile"
161+
args: "--with-suggests --with-recommends --with-test"
162+
- run: prove -lrv t
163+
env:
164+
AUTHOR_TESTING: 0
165+
RELEASE_TESTING: 0

.travis.yml

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

0 commit comments

Comments
 (0)