Skip to content

Commit 168e01c

Browse files
committed
new Dist::Zilla setup
1 parent 218de88 commit 168e01c

File tree

9 files changed

+462
-89
lines changed

9 files changed

+462
-89
lines changed

.editorconfig

Lines changed: 18 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,18 @@
1+
root = true
2+
3+
[*]
4+
indent_style = space
5+
indent_size = 4
6+
7+
end_of_line = lf
8+
charset = utf-8
9+
10+
trim_trailing_whitespace = true
11+
insert_final_newline = true
12+
13+
[*.{yml,yaml}]
14+
indent_size = 2
15+
quote_type = single
16+
17+
[Changes]
18+
indent_size = 2

.github/workflows/test.yml

Lines changed: 183 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,183 @@
1+
name: Test
2+
on:
3+
push: ~
4+
pull_request: ~
5+
6+
jobs:
7+
perl-versions:
8+
runs-on: ubuntu-latest
9+
name: Calculate Perl Versions
10+
outputs:
11+
versions: ${{ steps.perl-versions.outputs.perl-versions }}
12+
steps:
13+
- uses: actions/checkout@v4
14+
- name: Extract perl dependecy
15+
id: prereqs
16+
uses: perl-actions/get-prereqs@v1
17+
with:
18+
sources: prereqs.yml
19+
- id: perl-versions
20+
uses: perl-actions/perl-versions@v1
21+
with:
22+
since-perl: ${{ steps.prereqs.outputs.perl }}
23+
with-devel: true
24+
25+
build:
26+
runs-on: ubuntu-latest
27+
steps:
28+
- uses: actions/checkout@v4
29+
- uses: actions/cache@v4
30+
with:
31+
path: ~/.perl-cpm
32+
key: cpm-${{ runner.os }}
33+
- name: Setup local::lib
34+
run: |
35+
echo "$RUNNER_TEMP/perl5/bin" >> "$GITHUB_PATH"
36+
echo "PERL5LIB=$RUNNER_TEMP/perl5/lib/perl5:$PERL5LIB" >> "$GITHUB_ENV"
37+
echo "PERL_MB_OPT=--install_base $RUNNER_TEMP/perl5" >> "$GITHUB_ENV"
38+
echo "PERL_MM_OPT=INSTALL_BASE=$RUNNER_TEMP/perl5" >> "$GITHUB_ENV"
39+
- name: Extract Dist::Zilla dependencies
40+
id: authordeps
41+
uses: perl-actions/get-prereqs@v1
42+
with:
43+
sources: dist.ini
44+
phases: author
45+
exclude: Dist::Zilla::Plugin::Test::Pod::Coverage::TrustMe
46+
- name: Install authordeps
47+
uses: perl-actions/install-with-cpm@v1
48+
with:
49+
sudo: false
50+
install: ${{ steps.authordeps.outputs.prereqs }}
51+
- name: Build
52+
id: build
53+
run: |
54+
DZIL_COLOR=1 dzil build --no-tgz | tee "/tmp/dzil-build.log"
55+
echo build="$(grep --only-matching 'built in .*' "/tmp/dzil-build.log" | tail -1 | cut -c10-)" >> "$GITHUB_OUTPUT"
56+
- name: Upload build
57+
uses: actions/upload-artifact@v4
58+
with:
59+
name: ${{ steps.build.outputs.build }}
60+
path: ${{ steps.build.outputs.build }}
61+
include-hidden-files: true
62+
outputs:
63+
name: ${{ steps.build.outputs.build }}
64+
65+
test:
66+
needs:
67+
- perl-versions
68+
- build
69+
70+
strategy:
71+
fail-fast: false
72+
matrix:
73+
perl-version: ${{ fromJson(needs.perl-versions.outputs.versions) }}
74+
75+
runs-on: ubuntu-latest
76+
container:
77+
image: perl:${{ matrix.perl-version }}-buster
78+
79+
env:
80+
AUTOMATED_TESTING: 1
81+
PERL_USE_UNSAFE_INC: 0
82+
83+
steps:
84+
- name: Download build
85+
uses: actions/download-artifact@v4
86+
with:
87+
name: ${{ needs.build.outputs.name }}
88+
- uses: actions/cache@v4
89+
with:
90+
path: ~/.perl-cpm
91+
key: cpm-perl:${{ matrix.perl-version }}-buster
92+
- name: Setup local::lib
93+
run: |
94+
echo "$RUNNER_TEMP/perl5/bin" >> "$GITHUB_PATH"
95+
echo "PERL5LIB=$RUNNER_TEMP/perl5/lib/perl5:$PERL5LIB" >> "$GITHUB_ENV"
96+
echo "PERL_MB_OPT=--install_base $RUNNER_TEMP/perl5" >> "$GITHUB_ENV"
97+
echo "PERL_MM_OPT=INSTALL_BASE=$RUNNER_TEMP/perl5" >> "$GITHUB_ENV"
98+
- name: Extract configure dependecies
99+
id: configure
100+
uses: perl-actions/get-prereqs@v1
101+
with:
102+
phases: configure
103+
- name: Install configure deps
104+
uses: perl-actions/install-with-cpm@v1
105+
with:
106+
sudo: false
107+
install: ${{ steps.configure.outputs.prereqs }}
108+
- name: Run Makefile.PL
109+
run: perl Makefile.PL
110+
- name: Extract dependecies
111+
id: prereqs
112+
uses: perl-actions/get-prereqs@v1
113+
with:
114+
phases: build test runtime
115+
relationships: requires recommends suggests
116+
- name: Install deps
117+
uses: perl-actions/install-with-cpm@v1
118+
with:
119+
sudo: false
120+
install: ${{ steps.prereqs.outputs.prereqs }}
121+
- name: Run the tests
122+
run: make test
123+
env:
124+
AUTHOR_TESTING: 1
125+
126+
test-xt:
127+
needs:
128+
- perl-versions
129+
- build
130+
131+
runs-on: ubuntu-latest
132+
container:
133+
image: perl:5.36-buster
134+
135+
env:
136+
AUTOMATED_TESTING: 1
137+
138+
steps:
139+
- name: Download build
140+
uses: actions/download-artifact@v4
141+
with:
142+
name: ${{ needs.build.outputs.name }}
143+
- uses: actions/cache@v4
144+
with:
145+
path: ~/.perl-cpm
146+
key: cpm-perl:5.36-buster
147+
- name: Setup local::lib
148+
run: |
149+
echo "$RUNNER_TEMP/perl5/bin" >> "$GITHUB_PATH"
150+
echo "PERL5LIB=$RUNNER_TEMP/perl5/lib/perl5:$PERL5LIB" >> "$GITHUB_ENV"
151+
echo "PERL_MB_OPT=--install_base $RUNNER_TEMP/perl5" >> "$GITHUB_ENV"
152+
echo "PERL_MM_OPT=INSTALL_BASE=$RUNNER_TEMP/perl5" >> "$GITHUB_ENV"
153+
- name: Extract configure dependecies
154+
id: configure
155+
uses: perl-actions/get-prereqs@v1
156+
with:
157+
phases: configure
158+
- name: Install configure deps
159+
uses: perl-actions/install-with-cpm@v1
160+
with:
161+
sudo: false
162+
install: ${{ steps.configure.outputs.prereqs }}
163+
- name: Run Makefile.PL
164+
run: perl Makefile.PL
165+
- name: Extract dependecies
166+
id: prereqs
167+
uses: perl-actions/get-prereqs@v1
168+
with:
169+
phases: build test runtime develop
170+
relationships: requires recommends suggests
171+
- name: Install deps
172+
uses: perl-actions/install-with-cpm@v1
173+
with:
174+
sudo: false
175+
install: ${{ steps.prereqs.outputs.prereqs }}
176+
- name: Run the xt tests
177+
run: prove -l xt
178+
env:
179+
AUTHOR_TESTING: 1
180+
- name: Run the xt/author tests
181+
run: prove -lr xt/author
182+
env:
183+
AUTHOR_TESTING: 1

.gitignore

Lines changed: 11 additions & 18 deletions
Original file line numberDiff line numberDiff line change
@@ -1,20 +1,13 @@
1-
/blib/
2-
/.build/
3-
_build/
4-
cover_db/
5-
inc/
6-
Build
7-
!Build/
8-
Build.bat
9-
.last_cover_stats
10-
/Makefile
11-
/Makefile.old
121
/MANIFEST.bak
13-
/META.yml
14-
/META.json
15-
/MYMETA.*
16-
nytprof.out
2+
/Makefile.old
3+
/Makefile
4+
/blib/
175
/pm_to_blib
18-
*.o
19-
*.bs
20-
/_eumm/
6+
/MYMETA.json
7+
/MYMETA.yml
8+
/cover_db/
9+
/MYMETA.json.lock
10+
/MANIFEST
11+
/.build/
12+
/CatalystX-Fastly-Role-Response-*.tar.gz
13+
/CatalystX-Fastly-Role-Response-*/

.perlcriticrc

Lines changed: 81 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,81 @@
1+
severity = 1
2+
verbose = 9
3+
only = 1
4+
5+
[BuiltinFunctions::ProhibitLvalueSubstr]
6+
[BuiltinFunctions::ProhibitShiftRef]
7+
[BuiltinFunctions::ProhibitSleepViaSelect]
8+
[BuiltinFunctions::ProhibitStringyEval]
9+
[BuiltinFunctions::ProhibitUniversalCan]
10+
[BuiltinFunctions::ProhibitUniversalIsa]
11+
[BuiltinFunctions::ProhibitVoidGrep]
12+
[BuiltinFunctions::ProhibitVoidMap]
13+
[BuiltinFunctions::RequireGlobFunction]
14+
[BuiltinFunctions::RequireSimpleSortBlock]
15+
[ClassHierarchies::ProhibitOneArgBless]
16+
[CodeLayout::ProhibitHardTabs]
17+
[CodeLayout::RequireConsistentNewlines]
18+
[ControlStructures::ProhibitCascadingIfElse]
19+
[ControlStructures::ProhibitDeepNests]
20+
[ControlStructures::ProhibitLabelsWithSpecialBlockNames]
21+
[ControlStructures::ProhibitMutatingListFunctions]
22+
[ControlStructures::ProhibitNegativeExpressionsInUnlessAndUntilConditions]
23+
[ControlStructures::ProhibitUnreachableCode]
24+
[ControlStructures::ProhibitYadaOperator]
25+
[ErrorHandling::RequireCheckingReturnValueOfEval]
26+
[InputOutput::ProhibitBacktickOperators]
27+
[InputOutput::ProhibitBarewordFileHandles]
28+
[InputOutput::ProhibitExplicitStdin]
29+
[InputOutput::ProhibitInteractiveTest]
30+
[InputOutput::ProhibitJoinedReadline]
31+
[InputOutput::ProhibitOneArgSelect]
32+
[InputOutput::ProhibitReadlineInForLoop]
33+
[InputOutput::ProhibitTwoArgOpen]
34+
[InputOutput::RequireCheckedOpen]
35+
[InputOutput::RequireEncodingWithUTF8Layer]
36+
[Miscellanea::ProhibitFormats]
37+
[Miscellanea::ProhibitUnrestrictedNoCritic]
38+
[Modules::ProhibitAutomaticExportation]
39+
[Modules::ProhibitConditionalUseStatements]
40+
[Modules::ProhibitEvilModules]
41+
[Modules::ProhibitExcessMainComplexity]
42+
[Modules::RequireBarewordIncludes]
43+
[Modules::RequireEndWithOne]
44+
[Modules::RequireFilenameMatchesPackage]
45+
[NamingConventions::ProhibitAmbiguousNames]
46+
[Objects::ProhibitIndirectSyntax]
47+
[RegularExpressions::ProhibitCaptureWithoutTest]
48+
[RegularExpressions::ProhibitComplexRegexes]
49+
[RegularExpressions::ProhibitUnusedCapture]
50+
[Subroutines::ProhibitBuiltinHomonyms]
51+
[Subroutines::ProhibitExcessComplexity]
52+
max_mccabe = 30
53+
[Subroutines::ProhibitExplicitReturnUndef]
54+
[Subroutines::ProhibitManyArgs]
55+
[Subroutines::ProhibitNestedSubs]
56+
[Subroutines::ProhibitReturnSort]
57+
[Subroutines::ProhibitUnusedPrivateSubroutines]
58+
[Subroutines::ProtectPrivateSubs]
59+
[TestingAndDebugging::ProhibitProlongedStrictureOverride]
60+
[TestingAndDebugging::RequireTestLabels]
61+
[TestingAndDebugging::RequireUseStrict]
62+
[TestingAndDebugging::RequireUseWarnings]
63+
[ValuesAndExpressions::ProhibitCommaSeparatedStatements]
64+
[ValuesAndExpressions::ProhibitComplexVersion]
65+
[ValuesAndExpressions::ProhibitImplicitNewlines]
66+
[ValuesAndExpressions::ProhibitLeadingZeros]
67+
[ValuesAndExpressions::ProhibitMismatchedOperators]
68+
[ValuesAndExpressions::ProhibitQuotesAsQuotelikeOperatorDelimiters]
69+
[ValuesAndExpressions::ProhibitSpecialLiteralHeredocTerminator]
70+
[ValuesAndExpressions::RequireQuotedHeredocTerminator]
71+
[Variables::ProhibitAugmentedAssignmentInDeclaration]
72+
allow_our = 1
73+
[Variables::ProhibitConditionalDeclarations]
74+
[Variables::ProhibitMatchVars]
75+
[Variables::ProhibitReusedNames]
76+
[Variables::ProhibitUnusedVariables]
77+
[Variables::ProtectPrivateVars]
78+
[Variables::RequireInitializationForLocalVars]
79+
[Variables::RequireLexicalLoopIterators]
80+
[Variables::RequireLocalizedPunctuationVars]
81+
[Variables::RequireNegativeIndices]

Changes

Lines changed: 15 additions & 13 deletions
Original file line numberDiff line numberDiff line change
@@ -1,20 +1,22 @@
11
Revision history for Perl module CatalystX::Fastly::Role::Response:
22

3-
0.06 Mon 17 Oct 2016 19:14:48
4-
- Even set private when there is no current Cache-Control set
3+
{{ $NEXT }}
54

6-
0.05 Fri 14 Oct 2016 16:22:24
7-
- Correct cdn_no_cache() - set 'private' on Cache-Control
5+
0.06 2016-10-17
6+
- Even set private when there is no current Cache-Control set
87

9-
0.04 Tue 6 Sep 2016 18:19:26 BST
10-
- Add `use` for autopreq to make tests pass
8+
0.05 2016-10-14
9+
- Correct cdn_no_cache() - set 'private' on Cache-Control
1110

12-
0.03 Mon 5 Sep 2016 21:12:54 BST
13-
- be nice with finalize_headers and change to a 'before'
11+
0.04 2016-09-06
12+
- Add `use` for autopreq to make tests pass
1413

15-
0.02 Mon 5 Sep 2016 19:36:12 BST
16-
- Remove purge methods as MooseX::Fastly::Role could be used directly
17-
- Cleanup pod
14+
0.03 2016-09-05
15+
- be nice with finalize_headers and change to a 'before'
1816

19-
0.01 Sat 3 Sep 2016 20:48:51 BST
20-
- Initial release
17+
0.02 2016-09-05
18+
- Remove purge methods as MooseX::Fastly::Role could be used directly
19+
- Cleanup pod
20+
21+
0.01 2016-09-03
22+
- Initial release

0 commit comments

Comments
 (0)