Skip to content

Commit b902312

Browse files
committed
Use GH Perl helpers for build and coverage jobs
1 parent f5a258a commit b902312

File tree

2 files changed

+24
-34
lines changed

2 files changed

+24
-34
lines changed

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

Lines changed: 23 additions & 34 deletions
Original file line numberDiff line numberDiff line change
@@ -15,50 +15,39 @@ on:
1515
jobs:
1616
build:
1717
name: Build distribution
18-
runs-on: ubuntu-latest
19-
strategy:
20-
max-parallel: 1
18+
runs-on: ubuntu-20.04
2119
container:
2220
image: perldocker/perl-tester:5.34
2321
steps:
2422
- uses: actions/checkout@v2
25-
- name: Install author deps
26-
run: dzil authordeps | xargs cpm install -g --show-build-log-on-failure
27-
- name: dzil stale
28-
run: dzil stale | xargs cpm install -g --show-build-log-on-failure
29-
- name: Build
30-
run: dzil build --no-tgz --in dzil_build_dir
31-
- name: Maybe skip Changes test
32-
if: github.ref == 'refs/heads/master'
33-
run: rm dzil_build_dir/xt/release/changes_has_content.t && perl -pi -e "s|'xt/release/changes_has_content.t'||g" dzil_build_dir/xt/author/*
23+
- name: Run Tests
24+
env:
25+
AUTHOR_TESTING: 1
26+
AUTOMATED_TESTING: 1
27+
EXTENDED_TESTING: 1
28+
RELEASE_TESTING: 1
29+
TEST_TIDYALL_VERBOSE: 1
30+
run: auto-build-and-test-dist
3431
- uses: actions/upload-artifact@v2
3532
with:
3633
name: build_dir
37-
path: dzil_build_dir
38-
- name: Install deps
39-
if: success()
40-
run: >
41-
cd dzil_build_dir
42-
&& cpm install -g
43-
--cpanfile cpanfile
44-
--with-develop
45-
--with-recommends
46-
--with-suggests
47-
--show-build-log-on-failure
48-
- name: Run Tests with coverage
49-
if: success()
34+
path: build_dir
35+
coverage-job:
36+
needs: build
37+
runs-on: ubuntu-20.04
38+
container:
39+
image: perldocker/perl-tester:5.34
40+
steps:
41+
- uses: actions/checkout@v2 # codecov wants to be inside a Git repository
42+
- uses: actions/download-artifact@v2
43+
with:
44+
name: build_dir
45+
path: .
46+
- name: Install deps and test
47+
run: cpan-install-dist-deps && test-dist
5048
env:
51-
AUTHOR_TESTING: 1
5249
CODECOV_TOKEN: ${{secrets.CODECOV_TOKEN}}
5350
HARNESS_PERL_SWITCHES: "-MDevel::Cover=+ignore,^local/|^t/|^xt"
54-
RELEASE_TESTING: 1
55-
run: >
56-
cpm install -g
57-
--show-build-log-on-failure
58-
Devel::Cover::Report::Codecov &&
59-
cd dzil_build_dir
60-
&& prove -lr --jobs 2 t xt
61-
&& cover -report codecov
6251
test_linux:
6352
runs-on: ubuntu-latest
6453
name: Perl ${{ matrix.perl-version }} on ubuntu-latest

Changes

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,7 @@
11
Revision history for HTTP-Daemon
22

33
{{$NEXT}}
4+
- Use GH Perl helpers for build and coverage jobs (GH#53) (Olaf Alders)
45

56
6.13 2022-02-09 20:39:12Z
67
- Bump minimum IO::Socket::IP version to 0.32 (GH#50) (Olaf Alders)

0 commit comments

Comments
 (0)