-
Notifications
You must be signed in to change notification settings - Fork 60
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
Showing
8 changed files
with
196 additions
and
134 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,53 @@ | ||
name: "perl test suite" | ||
on: [ push, pull_request ] | ||
|
||
jobs: | ||
the-tests: | ||
runs-on: ubuntu-latest | ||
container: | ||
image: perldocker/perl-tester:5.16 | ||
strategy: | ||
fail-fast: false | ||
steps: | ||
- name: Check out repo | ||
uses: actions/checkout@v3 | ||
- name: Makefile.PL | ||
run: | | ||
perl Makefile.PL && make | ||
- name: Install prereqs (apt) | ||
# If we install "default-mysql-server", the web tests will run, which | ||
# is good, but they will run forever when we get to | ||
# t/pause_2017/action/change_passwd.t not responding to SIGTERM or | ||
# SIGKILL. I seem to recall something about signals being weird on | ||
# Actions, but not how... -- rjbs, 2023-05-05 | ||
run: | | ||
apt update | ||
apt install -y rsync | ||
- name: Install prereqs (cpanm, pinned versions) | ||
# PAUSE is run (for now?) on v5.16, and the latest versions from the | ||
# CPAN don't install on v5.16, so we install these version that do. | ||
# -- rjbs, 2023-05-05 | ||
run: | | ||
cpanm Log::[email protected] | ||
cpanm [email protected] | ||
- name: Install prereqs (cpan) | ||
# This could probably be made more efficient by looking at what it's | ||
# installing via cpanm that could, instead, be installed from apt. I | ||
# may do that later, but for now, it's fine! -- rjbs, 2023-01-07 | ||
run: cpanm --notest --installdeps . | ||
- name: Install yath and JUnit renderer | ||
run: cpanm --notest Test2::Harness Test2::Harness::Renderer::JUnit | ||
- name: Run the tests | ||
# We disable Test::Perl::Critic because of a bug in | ||
# Test2::Harness::Renderer::JUnit. See: | ||
# https://github.com/cpanel/Test2-Harness-Renderer-JUnit/issues/16 | ||
# -- rjbs, 2023-05-05 | ||
run: | | ||
NO_PERL_CRITIC=1 JUNIT_TEST_FILE="/tmp/test-output.xml" ALLOW_PASSING_TODOS=1 yath test --renderer=Formatter --renderer=JUnit -D | ||
- name: Publish test report | ||
uses: mikepenz/action-junit-report@v3 | ||
if: always() # always run even if the previous step fails | ||
with: | ||
check_name: JUnit Report | ||
report_paths: /tmp/test-output.xml | ||
|
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -3,113 +3,115 @@ | |
use strict; | ||
use ExtUtils::MakeMaker; | ||
WriteMakefile( | ||
NAME => 'PAUSE', | ||
VERSION_FROM => 'lib/PAUSE.pm', | ||
ABSTRACT_FROM => 'lib/PAUSE.pod', | ||
AUTHOR => 'Andreas Koenig <[email protected]>', | ||
LICENSE => 'perl', | ||
PREREQ_PM => { map +($_ => 0), qw( | ||
Apache::Session::Counted | ||
BSD::Resource | ||
Capture::Tiny | ||
CPAN::Checksums | ||
CPAN::DistnameInfo | ||
CPAN::Indexer::Mirror | ||
Class::MOP::Class | ||
Class::Singleton | ||
Compress::Zlib | ||
Crypt::Eksblowfish::Bcrypt | ||
Cwd | ||
DB_File | ||
DBD::mysql | ||
DBD::SQLite | ||
DBI | ||
DBIx::RunSQL | ||
Devel::Peek | ||
Dumpvalue | ||
Email::Address | ||
Email::MIME | ||
Email::Sender::Simple | ||
EV | ||
File::Copy::Recursive | ||
File::pushd | ||
File::Rsync::Mirror::Recentfile | ||
File::Temp | ||
File::Which | ||
Git::Wrapper | ||
HTML::Entities | ||
HTTP::Date | ||
HTTP::Request::Common | ||
HTTP::Tiny | ||
IO::Socket::SSL | ||
IPC::Cmd | ||
IPC::Run3 | ||
JSON::XS | ||
Log::Dispatch | ||
Log::Dispatch::Config | ||
Log::Dispatchouli | ||
Log::Dispatchouli::Global | ||
LWP::UserAgent | ||
LWP::Protocol::https | ||
Digest::SHA | ||
Mail::Mailer | ||
Module::Faker::Dist | ||
Module::Signature | ||
Moo | ||
Mojolicious | ||
Mojolicious::Plugin::WithCSRFProtection | ||
MojoX::Log::Dispatch::Simple | ||
MooseX::StrictConstructor | ||
Net::FTP | ||
Net::SSLeay | ||
Parse::CPAN::Packages | ||
Parse::CPAN::Perms | ||
Path::Class | ||
Path::Tiny | ||
Plack | ||
Plack::App::Directory::Apaxy | ||
Plack::Middleware::Auth::Basic | ||
Plack::Middleware::ReverseProxy | ||
Plack::Middleware::ServerStatus::Tiny | ||
Process::Status | ||
Set::Crontab | ||
SQL::Maker | ||
String::Random | ||
Test::Class | ||
Test::Deep | ||
Test::FITesque::Fixture | ||
Test::MockObject | ||
Test::mysqld | ||
Test::Requires | ||
Test::WWW::Mechanize::PSGI | ||
Text::Format | ||
Text::Markdown::Hoedown | ||
Text::Metaphone | ||
Text::Soundex | ||
Text::Unidecode | ||
Time::Duration | ||
Time::HiRes | ||
URI::Escape | ||
URI::URL | ||
Unicode::Collate | ||
Unicode::String | ||
WWW::Mechanize::Boilerplate | ||
XML::LibXML | ||
XML::Parser | ||
XML::SAX::Base | ||
XML::SAX::Writer | ||
YAML::XS | ||
)}, | ||
SIGN => 1, | ||
test => { RECURSIVE_TEST_FILES => 1 }, | ||
($ExtUtils::MakeMaker::VERSION >= 6.4502 ? | ||
(META_ADD => { | ||
resources => { | ||
repository => "git://github.com/andk/pause.git", | ||
}, | ||
keywords => ['CPAN','perl','perl authors upload server'], | ||
}) : ()), | ||
); | ||
NAME => 'PAUSE', | ||
VERSION_FROM => 'lib/PAUSE.pm', | ||
ABSTRACT_FROM => 'lib/PAUSE.pod', | ||
AUTHOR => 'Andreas Koenig <[email protected]>', | ||
LICENSE => 'perl', | ||
PREREQ_PM => { map +($_ => 0), qw( | ||
Apache::Session::Counted | ||
BSD::Resource | ||
Capture::Tiny | ||
CPAN::Checksums | ||
CPAN::DistnameInfo | ||
CPAN::Indexer::Mirror | ||
Class::MOP::Class | ||
Class::Singleton | ||
Compress::Zlib | ||
Crypt::Eksblowfish::Bcrypt | ||
Cwd | ||
DB_File | ||
DBD::mysql | ||
DBD::SQLite | ||
DBI | ||
DBIx::RunSQL | ||
Devel::Peek | ||
Dumpvalue | ||
Email::Address | ||
Email::MIME | ||
Email::Sender::Simple | ||
EV | ||
File::Copy::Recursive | ||
File::pushd | ||
File::Rsync::Mirror::Recentfile | ||
File::Temp | ||
File::Which | ||
Git::Wrapper | ||
HTML::Entities | ||
HTTP::Date | ||
HTTP::Request::Common | ||
HTTP::Tiny | ||
IO::Socket::SSL | ||
IPC::Cmd | ||
IPC::Run3 | ||
JSON::XS | ||
Log::Dispatch | ||
Log::Dispatch::Config | ||
Log::Dispatchouli | ||
Log::Dispatchouli::Global | ||
LWP::UserAgent | ||
LWP::Protocol::https | ||
Digest::SHA | ||
Mail::Mailer | ||
Module::Faker::Dist | ||
Module::Signature | ||
Moo | ||
Mojolicious | ||
Mojolicious::Plugin::WithCSRFProtection | ||
MojoX::Log::Dispatch::Simple | ||
MooseX::StrictConstructor | ||
Net::FTP | ||
Net::SSLeay | ||
Parse::CPAN::Packages | ||
Parse::CPAN::Perms | ||
Path::Class | ||
Path::Tiny | ||
Plack | ||
Plack::App::Directory::Apaxy | ||
Plack::Middleware::Auth::Basic | ||
Plack::Middleware::ReverseProxy | ||
Plack::Middleware::ServerStatus::Tiny | ||
Process::Status | ||
Set::Crontab | ||
SQL::Maker | ||
String::Random | ||
Test::Class | ||
Test::Deep | ||
Test::FITesque::Fixture | ||
Test::MockObject | ||
Test::mysqld | ||
Test::Requires | ||
Test::WWW::Mechanize::PSGI | ||
Text::Format | ||
Text::Markdown::Hoedown | ||
Text::Metaphone | ||
Text::Soundex | ||
Text::Unidecode | ||
Time::Duration | ||
Time::HiRes | ||
URI::Escape | ||
URI::URL | ||
Unicode::Collate | ||
Unicode::String | ||
WWW::Mechanize::Boilerplate | ||
XML::LibXML | ||
XML::Parser | ||
XML::SAX::Base | ||
XML::SAX::Writer | ||
YAML::XS | ||
)}, | ||
SIGN => 1, | ||
|
||
test => { RECURSIVE_TEST_FILES => 1 }, | ||
($ExtUtils::MakeMaker::VERSION >= 6.4502 | ||
? (META_ADD => { | ||
resources => { | ||
repository => "git://github.com/andk/pause.git", | ||
}, | ||
keywords => ['CPAN','perl','perl authors upload server'], | ||
}) | ||
: ()), | ||
); | ||
|
||
sub MY::postamble { | ||
<<EOF; | ||
|
This file was deleted.
Oops, something went wrong.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -242,6 +242,12 @@ has pause_config_overrides => ( | |
builder => '_build_pause_config_overrides', | ||
); | ||
|
||
my $GIT_CONFIG = <<'END_GIT_CONFIG'; | ||
[user] | ||
email = [email protected] | ||
name = "PAUSE Daemon Git User" | ||
END_GIT_CONFIG | ||
|
||
sub _build_pause_config_overrides { | ||
my ($self) = @_; | ||
|
||
|
@@ -263,6 +269,14 @@ sub _build_pause_config_overrides { | |
{ | ||
my $chdir_guard = pushd($git_dir); | ||
system(qw(git init)) and die "error running git init"; | ||
|
||
my $git_config = File::Spec->catdir($git_dir, '.git/config'); | ||
open my $config_fh, '>', $git_config | ||
or die "can't create git config at $git_config: $!"; | ||
|
||
print {$config_fh} $GIT_CONFIG; | ||
close $config_fh | ||
or die "can't write git config at $git_config: $!"; | ||
} | ||
|
||
my $dsnbase = "DBI:SQLite:dbname=$db_root"; | ||
|
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,4 +1,4 @@ | ||
#!perl -- -*- mode: cperl -*- | ||
#!perl | ||
|
||
use Test::More; | ||
use File::Spec; | ||
|
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters