Skip to content

Commit

Permalink
Reduce cpanfile dependencies
Browse files Browse the repository at this point in the history
We are using a cPanel Perl stack, thus we only
need to list missing required packages.

We do not really need to run cpm/cpanm twice.
  • Loading branch information
atoomic committed Nov 27, 2024
1 parent e15520f commit 8df13f6
Show file tree
Hide file tree
Showing 4 changed files with 9 additions and 136 deletions.
8 changes: 4 additions & 4 deletions .github/workflows/testsuite.yml
Original file line number Diff line number Diff line change
Expand Up @@ -43,16 +43,16 @@ jobs:

- run: perl -V

- name: Install Perl dependencies
- name: cpanel-setup
run: /bin/bash t/cpanel-setup

- name: Install Extra Perl dependencies
uses: perl-actions/install-with-cpm@v1
with:
sudo: false
cpanfile: "t/cpanfile"
args: "--with-all"

- name: cpanel-setup
run: /bin/bash t/cpanel-setup

- name: which prove
run: ls -l $(which prove)

Expand Down
3 changes: 1 addition & 2 deletions t/00_load.t
Original file line number Diff line number Diff line change
Expand Up @@ -5,8 +5,7 @@
# [email protected] http://cpanel.net
# This code is subject to the cPanel license. Unauthorized copying is prohibited.

use strict;
use warnings;
use cPstrict;
use FindBin;

use version;
Expand Down
3 changes: 0 additions & 3 deletions t/cpanel-setup
Original file line number Diff line number Diff line change
Expand Up @@ -54,9 +54,6 @@ echo "# ............. which perl"
which perl
ls -l /usr/local/cpanel/3rdparty/perl/536/bin/perl

echo "# ............. cpanm round 2"
perl bin/cpanm -n --cpanfile ${REPO}/t/cpanfile --installdeps .

echo "# ............. scripts/cpservice"
scripts/cpservice cpanel install ||:

Expand Down
131 changes: 4 additions & 127 deletions t/cpanfile
Original file line number Diff line number Diff line change
Expand Up @@ -5,139 +5,16 @@
# [email protected] http://cpanel.net
# This code is subject to the cPanel license. Unauthorized copying is prohibited.

requires "Algorithm::Dependency::Ordered";
requires "Config::Tiny";
requires "File::Copy::Recursive";
requires "File::Slurper";
requires "Hash::Merge";
requires "HTTP::Tiny::UA::Response";
requires "Log::Log4perl";
requires "Moo";
requires "Params::Util";
requires "Simple::Accessor";
requires "Sub::Identify";
requires "Net::CIDR";
requires "IO::Prompt";
##
## This file is listing extra dependencies not provided by the default cPanel stack
##

# test
on 'test' => sub {
requires "File::Temp";
requires "Overload::FileCheck";
requires "Pod::PlainText";
requires "Test2::Bundle::Extended";
requires "Test2::Plugin::NoWarnings";
requires "Test2::Tools::Explain";
requires "Test::MockFile" => "0.032";
requires "Test::MockModule";
requires "Test::More";
requires "Test::Class";
requires "Test::Simple";

# perlcritic
recommends "Perl::Critic::Policy::CodeLayout::ProhibitFatCommaNewline";
recommends "Perl::Critic::Policy::CodeLayout::ProhibitIfIfSameLine";
recommends "Perl::Critic::Policy::CodeLayout::RequireFinalSemicolon";
recommends "Perl::Critic::Policy::CodeLayout::RequireTrailingCommaAtNewline";
recommends "Perl::Critic::Policy::Community::AmpersandSubCalls";
recommends "Perl::Critic::Policy::Community::ArrayAssignAref";
recommends "Perl::Critic::Policy::Community::BarewordFilehandles";
recommends "Perl::Critic::Policy::Community::ConditionalDeclarations";
recommends "Perl::Critic::Policy::Community::ConditionalImplicitReturn";
recommends "Perl::Critic::Policy::Community::DeprecatedFeatures";
recommends "Perl::Critic::Policy::Community::DiscouragedModules";
recommends "Perl::Critic::Policy::Community::DollarAB";
recommends "Perl::Critic::Policy::Community::Each";
recommends "Perl::Critic::Policy::Community::EmptyReturn";
recommends "Perl::Critic::Policy::Community::IndirectObjectNotation";
recommends "Perl::Critic::Policy::Community::LexicalForeachIterator";
recommends "Perl::Critic::Policy::Community::LoopOnHash";
recommends "Perl::Critic::Policy::Community::ModPerl";
recommends "Perl::Critic::Policy::Community::MultidimensionalArrayEmulation";
recommends "Perl::Critic::Policy::Community::OverloadOptions";
recommends "Perl::Critic::Policy::Community::POSIXImports";
recommends "Perl::Critic::Policy::Community::PackageMatchesFilename";
recommends "Perl::Critic::Policy::Community::PreferredAlternatives";
recommends "Perl::Critic::Policy::Community::StrictWarnings";
recommends "Perl::Critic::Policy::Community::Threads";
recommends "Perl::Critic::Policy::Community::WarningsSwitch";
recommends "Perl::Critic::Policy::Community::WarningsSwitch";
recommends "Perl::Critic::Policy::Compatibility::ConstantLeadingUnderscore";
recommends "Perl::Critic::Policy::Compatibility::ConstantPragmaHash";
recommends "Perl::Critic::Policy::Compatibility::Gtk2Constants";
recommends "Perl::Critic::Policy::Compatibility::PerlMinimumVersionAndWhy";
recommends "Perl::Critic::Policy::Compatibility::PodMinimumVersion";
recommends "Perl::Critic::Policy::Compatibility::ProhibitUnixDevNull";
recommends "Perl::Critic::Policy::CompileTime";
recommends "Perl::Critic::Policy::Documentation::ProhibitAdjacentLinks";
recommends "Perl::Critic::Policy::Documentation::ProhibitBadAproposMarkup";
recommends "Perl::Critic::Policy::Documentation::ProhibitDuplicateHeadings";
recommends "Perl::Critic::Policy::Documentation::ProhibitDuplicateSeeAlso";
recommends "Perl::Critic::Policy::Documentation::ProhibitLinkToSelf";
recommends "Perl::Critic::Policy::Documentation::ProhibitParagraphEndComma";
recommends "Perl::Critic::Policy::Documentation::ProhibitParagraphTwoDots";
recommends "Perl::Critic::Policy::Documentation::ProhibitUnbalancedParens";
recommends "Perl::Critic::Policy::Documentation::ProhibitVerbatimMarkup";
recommends "Perl::Critic::Policy::Documentation::RequireEndBeforeLastPod";
recommends "Perl::Critic::Policy::Documentation::RequireFilenameMarkup";
recommends "Perl::Critic::Policy::Documentation::RequireFinalCut";
recommends "Perl::Critic::Policy::Documentation::RequireLinkedURLs";
recommends "Perl::Critic::Policy::Freenode::AmpersandSubCalls";
recommends "Perl::Critic::Policy::Freenode::ArrayAssignAref";
recommends "Perl::Critic::Policy::Freenode::BarewordFilehandles";
recommends "Perl::Critic::Policy::Freenode::ConditionalDeclarations";
recommends "Perl::Critic::Policy::Freenode::ConditionalImplicitReturn";
recommends "Perl::Critic::Policy::Freenode::DeprecatedFeatures";
recommends "Perl::Critic::Policy::Freenode::DiscouragedModules";
recommends "Perl::Critic::Policy::Freenode::DollarAB";
recommends "Perl::Critic::Policy::Freenode::Each";
recommends "Perl::Critic::Policy::Freenode::EmptyReturn";
recommends "Perl::Critic::Policy::Freenode::IndirectObjectNotation";
recommends "Perl::Critic::Policy::Freenode::LexicalForeachIterator";
recommends "Perl::Critic::Policy::Freenode::LoopOnHash";
recommends "Perl::Critic::Policy::Freenode::ModPerl";
recommends "Perl::Critic::Policy::Freenode::MultidimensionalArrayEmulation";
recommends "Perl::Critic::Policy::Freenode::OpenArgs";
recommends "Perl::Critic::Policy::Freenode::OverloadOptions";
recommends "Perl::Critic::Policy::Freenode::POSIXImports";
recommends "Perl::Critic::Policy::Freenode::PackageMatchesFilename";
recommends "Perl::Critic::Policy::Freenode::PreferredAlternatives";
recommends "Perl::Critic::Policy::Freenode::Prototypes";
recommends "Perl::Critic::Policy::Freenode::StrictWarnings";
recommends "Perl::Critic::Policy::Freenode::Threads";
recommends "Perl::Critic::Policy::Freenode::Wantarray";
recommends "Perl::Critic::Policy::Freenode::WarningsSwitch";
recommends "Perl::Critic::Policy::Freenode::WhileDiamondDefaultAssignment";
recommends "Perl::Critic::Policy::Miscellanea::TextDomainPlaceholders";
recommends "Perl::Critic::Policy::Miscellanea::TextDomainUnused";
recommends "Perl::Critic::Policy::Modules::ProhibitModuleShebang";
recommends "Perl::Critic::Policy::Modules::ProhibitPOSIXimport";
recommends "Perl::Critic::Policy::Modules::ProhibitUseQuotedVersion";
recommends "Perl::Critic::Policy::Modules::RequireExplicitInclusion";
recommends "Perl::Critic::Policy::Subroutines::ProhibitCallsToUndeclaredSubs";
recommends "Perl::Critic::Policy::Subroutines::ProhibitCallsToUnexportedSubs";
recommends "Perl::Critic::Policy::Subroutines::ProhibitExportingUndeclaredSubs";
recommends "Perl::Critic::Policy::ValuesAndExpressions::ConstantBeforeLt";
recommends "Perl::Critic::Policy::ValuesAndExpressions::NotWithCompare";
recommends "Perl::Critic::Policy::ValuesAndExpressions::ProhibitArrayAssignAref";
recommends "Perl::Critic::Policy::ValuesAndExpressions::ProhibitBarewordDoubleColon";
recommends "Perl::Critic::Policy::ValuesAndExpressions::ProhibitDuplicateHashKeys";
recommends "Perl::Critic::Policy::ValuesAndExpressions::ProhibitEmptyCommas";
recommends "Perl::Critic::Policy::ValuesAndExpressions::ProhibitFiletest_f";
recommends "Perl::Critic::Policy::ValuesAndExpressions::ProhibitNullStatements";
recommends "Perl::Critic::Policy::ValuesAndExpressions::ProhibitUnknownBackslash";
recommends "Perl::Critic::Policy::ValuesAndExpressions::RequireNumericVersion";
recommends "Perl::Critic::Policy::ValuesAndExpressions::UnexpandedSpecialLiteral";
recommends "Perl::Critic::Policy::Variables::ProhibitLoopOnHash";
recommends "Perl::Critic::Policy::Community::OpenArgs";
recommends "Perl::Critic::Policy::Community::Prototypes";
recommends "Perl::Critic::Policy::Community::Wantarray";
recommends "Perl::Critic::Policy::Subroutines::ProhibitQualifiedSubDeclarations";
requires "Test::MockFile" => "0.032";

# test coverage
recommends "Devel::Cover";
recommends "Template";
recommends "JSON::MaybeXS";
recommends "Perl::Critic::Policy::TestingAndDebugging::ProhibitNoWarnings";
recommends "Test::Perl::Critic";
recommends "Test::PerlTidy";
recommends "Test::Pod";
Expand Down

0 comments on commit 8df13f6

Please sign in to comment.