Skip to content

Commit

Permalink
Merge 6626651 into 7c243b4
Browse files Browse the repository at this point in the history
  • Loading branch information
bayashi committed Apr 25, 2021
2 parents 7c243b4 + 6626651 commit d69e8cc
Show file tree
Hide file tree
Showing 15 changed files with 236 additions and 36 deletions.
37 changes: 37 additions & 0 deletions .github/workflows/linux.yml
@@ -0,0 +1,37 @@
name: linux

on:
push:
branches:
- main
tags-ignore:
- '*'
pull_request:
branches:
- '!bump-version'
- '!bump_version'
- '!doc?'
- '!pod'

jobs:
perl:
runs-on: ubuntu-latest

strategy:
matrix:
perl-version:
- '5.8'
- '5.18'
- '5.28'

container:
image: perl:${{ matrix.perl-version }}

steps:
- uses: actions/checkout@v1
- name: perl -V
run: perl -V
- name: Install dependencies
run: curl -sL https://git.io/cpm | perl - install -g --with-recommends --with-test --with-configure --show-build-log-on-failure
- name: Run test
run: prove -l t
27 changes: 27 additions & 0 deletions .github/workflows/mac_latest.yml
@@ -0,0 +1,27 @@
name: mac_latest

on:
push:
branches:
- main
tags-ignore:
- '*'
pull_request:
branches:
- '!bump-version'
- '!bump_version'
- '!doc?'
- '!pod'

jobs:
perl:
runs-on: macOS-latest

steps:
- uses: actions/checkout@main
- name: perl -V
run: perl -V
- name: Install dependencies
run: curl -sL https://git.io/cpm | perl - install -g --with-recommends --with-test --with-configure --with-develop --show-build-log-on-failure
- name: Run test
run: prove -l t
36 changes: 36 additions & 0 deletions .github/workflows/main.yml
@@ -0,0 +1,36 @@
name: main

on:
push:
branches:
- '*'
tags-ignore:
- '*'
pull_request:

jobs:
perl:
runs-on: ubuntu-latest

container:
image: perl:latest

steps:
- uses: actions/checkout@v1
- name: perl -V
run: perl -V
- name: Install dependencies
run: curl -sL https://git.io/cpm | perl - install -g --with-recommends --with-test --with-configure --with-develop --show-build-log-on-failure
- name: Run build
run: perl Build.PL
- name: Build manifest
run: ./Build manifest
- name: Run test
run: ./Build test
- name: Run Cover
env:
COVERALLS_REPO_TOKEN: ${{ secrets.COVERALLS_REPO_TOKEN }}
run: |
curl -sL https://git.io/cpm | perl - install -g --show-build-log-on-failure Devel::Cover::Report::Coveralls
cover -test
cover -report coveralls
41 changes: 41 additions & 0 deletions .github/workflows/upload_cpan.yml
@@ -0,0 +1,41 @@
name: upload_cpan

on:
push:
branches-ignore:
- '*'
tags:
- '*.*'

jobs:
perl:
runs-on: ubuntu-latest

container:
image: perl:latest

steps:
- uses: actions/checkout@v1
- name: perl -V
run: perl -V
- name: Install dependencies
run: curl -sL https://git.io/cpm | perl - install -g --with-recommends --with-test --with-configure --with-develop --show-build-log-on-failure
- name: Run build
run: |
perl Makefile.PL && make && make manifest
make disttest
make dist
- name: CPANize
env:
PAUSE_USER: ${{ secrets.PAUSE_USER }}
PAUSE_PASSWORD: ${{ secrets.PAUSE_PASSWORD }}
PAUSE_MAILTO: ${{ secrets.PAUSE_MAILTO }}
run: |
curl -sL https://git.io/cpm | perl - install -g --show-build-log-on-failure CPAN::Uploader
echo "user" $PAUSE_USER > $HOME/.pause
echo "password" $PAUSE_PASSWORD >> $HOME/.pause
echo "mailto" $PAUSE_MAILTO >> $HOME/.pause
chmod 0600 $HOME/.pause
ls -la $HOME
ls -la
cpan-upload -c $HOME/.pause -u $PAUSE_USER -p "" ./Test-Arrow-`perl -Ilib -MTest::Arrow -e 'print $Test::Arrow::VERSION'`.tar.gz
26 changes: 26 additions & 0 deletions .github/workflows/windows_latest.yml
@@ -0,0 +1,26 @@
name: windows_latest

on:
push:
branches:
- main
- '**windows**'
tags-ignore:
- '*'

jobs:
perl:
runs-on: windows-latest

steps:
- uses: actions/checkout@v1
- name: Set up Perl
run: |
choco install strawberryperl
echo "C:\strawberry\c\bin;C:\strawberry\perl\site\bin;C:\strawberry\perl\bin" >> $GITHUB_PATH
- name: perl -V
run: perl -V
- name: Install dependencies
run: curl -sL https://git.io/cpm | perl - install -g --with-recommends --with-test --with-configure --with-develop --show-build-log-on-failure
- name: Run test
run: prove -l t
7 changes: 7 additions & 0 deletions .gitignore
@@ -1,12 +1,19 @@
cover_db
Makefile
Build
_build
blib
inc
local
extlib
pm_to_blib
MANIFEST
Makefile.old
nytprof.out
MANIFEST.bak
*.sw[po]
META.yml
META.json
MYMETA.*
*.tar.gz
Plack-Middleware-RequestId-*
1 change: 0 additions & 1 deletion .shipit

This file was deleted.

30 changes: 4 additions & 26 deletions Build.PL
@@ -1,45 +1,23 @@
use strict;
use warnings;
use Module::Build;
use Module::Build::Pluggable qw/CPANfile/;

my $builder = Module::Build->new(
my $builder = Module::Build::Pluggable->new(
name => 'Plack-Middleware-RequestId',
module_name => 'Plack::Middleware::RequestId',
license => 'perl',
license => 'artistic_2',
dist_author => 'Dai Okabayashi <bayashi@cpan.org>',
dist_version_from => 'lib/Plack/Middleware/RequestId.pm',
configure_requires => {
'Module::Build' => 0.38,
},
build_requires => {
'Test::More' => 0.88,
'HTTP::Request::Common' => 0,
'LWP::UserAgent' => 0,
'Plack::Builder' => 0,
'Plack::Test' => 0,
},
requires => {
'perl' => '5.008000',
'strict' => 0,
'warnings' => 0,
'Data::UUID' => 0,
'Plack::Middleware' => 0,
'Plack::Util' => 0,
'Plack::Util::Accessor' => 0,
},
add_to_cleanup => [ 'Plack-Middleware-RequestId-*' ],
meta_merge => {
resources => {
repository => 'http://github.com/bayashi/Plack-Middleware-RequestId',
bugtracker => 'http://github.com/bayashi/Plack-Middleware-RequestId/issues',
x_IRC => {
url => 'irc://chat.freenode.org/#bayadev',
web => 'http://webchat.freenode.net/?channels=%23bayadev',
},
}
},
recursive_test_files => 1,
test_files => (-d '.git' || $ENV{RELEASE_TESTING}) ? ['t/', 'xt/'] : ['t/'],
create_license => 1, # https://metacpan.org/pod/Software::License
);

$builder->create_build_script();
10 changes: 5 additions & 5 deletions MANIFEST.SKIP
Expand Up @@ -9,21 +9,21 @@
^blib/
^_build/
^cover_db/
^local/
^extlib/
^pm_to_blib
^MakeMaker-\d
\.gz$
\.gitignore
\.cvsignore
^t/9\d_.*\.t
^t/perlcritic
^tools/
\.svn/
^[^/]+\.yaml$
^[^/]+\.pl$
^\.shipit$
^\.github/
^\.git/
\.sw[po]$
^MYMETA\.*$
^META\.yml$
^Plack-Middleware-RequestId-*
^MYMETA\.yml$
^MYMETA\.json$
^MYMETA\.json$
3 changes: 1 addition & 2 deletions README.pod
Expand Up @@ -5,8 +5,7 @@ This is Perl module B<Plack::Middleware::RequestId>.

=begin html

<a href="https://coveralls.io/r/bayashi/Plack-Middleware-RequestId"><img src="https://coveralls.io/repos/bayashi/Plack-Middleware-RequestId/badge.png?_t=1467254265&branch=master"/></a> <a href="http://cpants.cpanauthors.org/dist/Plack-Middleware-RequestId"><img src="http://cpa
nts.cpanauthors.org/dist/Plack-Middleware-RequestId.png"/></a>
<a href="https://github.com/bayashi/Plack-Middleware-RequestId/blob/main/README.pod"><img src="https://img.shields.io/badge/Version-0.06-green?style=flat"></a> <a href="https://github.com/bayashi/Plack-Middleware-RequestId/blob/main/LICENSE"><img src="https://img.shields.io/badge/LICENSE-Artistic%202.0-GREEN.png"></a> <a href="https://github.com/bayashi/Plack-Middleware-RequestId/actions"><img src="https://github.com/bayashi/Plack-Middleware-RequestId/workflows/main/badge.svg?_t=1587735883"/></a> <a href="https://coveralls.io/r/bayashi/Plack-Middleware-RequestId"><img src="https://coveralls.io/repos/bayashi/Plack-Middleware-RequestId/badge.png?_t=1587735883&branch=main"/></a>

=end html

Expand Down
34 changes: 34 additions & 0 deletions cpanfile
@@ -0,0 +1,34 @@
# http://bit.ly/cpanfile
# http://bit.ly/cpanfile_version_formats
requires 'perl', '5.008005';
requires 'strict';
requires 'warnings';
requires 'Data::UUID';
requires 'Plack::Middleware';
requires 'Plack::Util';
requires 'Plack::Util::Accessor';

on 'configure' => sub {
requires 'Module::Build' , '0.40';
requires 'Module::Build::Pluggable';
requires 'Module::Build::Pluggable::CPANfile';
};

on 'test' => sub {
requires 'HTTP::Request::Common';
requires 'LWP::UserAgent';
requires 'Plack::Builder';
requires 'Plack::Test';
};

on 'develop' => sub {
requires 'Software::License';
requires 'Test::Perl::Critic';
requires 'Test::Pod::Coverage';
requires 'Test::Pod';
requires 'Test::NoTabs';
requires 'Test::Perl::Metrics::Lite';
requires 'Test::Vars';
requires 'File::Find::Rule::ConflictMarker';
requires 'File::Find::Rule::BOM';
};
2 changes: 1 addition & 1 deletion lib/Plack/Middleware/RequestId.pm
Expand Up @@ -151,7 +151,7 @@ Normally, you get the request ID from PSGI env. However, the ID has been stored
=begin html
<a href="https://coveralls.io/r/bayashi/Plack-Middleware-RequestId"><img src="https://coveralls.io/repos/bayashi/Plack-Middleware-RequestId/badge.png?_t=1467254265&branch=master"/></a>
<a href="https://github.com/bayashi/Plack-Middleware-RequestId/blob/main/README.pod"><img src="https://img.shields.io/badge/Version-0.06-green?style=flat"></a> <a href="https://github.com/bayashi/Plack-Middleware-RequestId/blob/main/LICENSE"><img src="https://img.shields.io/badge/LICENSE-Artistic%202.0-GREEN.png"></a> <a href="https://github.com/bayashi/Plack-Middleware-RequestId/actions"><img src="https://github.com/bayashi/Plack-Middleware-RequestId/workflows/main/badge.svg?_t=1587735883"/></a> <a href="https://coveralls.io/r/bayashi/Plack-Middleware-RequestId"><img src="https://coveralls.io/repos/bayashi/Plack-Middleware-RequestId/badge.png?_t=1587735883&branch=main"/></a>
=end html
Expand Down
2 changes: 1 addition & 1 deletion xt/04_notabs.t
@@ -1,4 +1,4 @@
use Test::More;
eval "use Test::NoTabs";
plan skip_all => "Test::NoTabs required for testing POD" if $@;
all_perl_files_ok();
all_perl_files_ok('lib');
9 changes: 9 additions & 0 deletions xt/07_no_conflict.t
@@ -0,0 +1,9 @@
use Test::More;
eval "use File::Find::Rule; use Test::File::Find::Rule;";
plan skip_all => "skip the no conflict test because $@" if $@;
match_rule_no_result(
File::Find::Rule->file->relative->name(qr/(?<!blib)/)->name(qr/^(?<!07_no_conflict\.t)$/)->nonempty->grep(qr/(<<<<<<<|=======|>>>>>>>)/, sub { 0 }),
'.',
'no conflict'
);
done_testing;
7 changes: 7 additions & 0 deletions xt/08_no_bom.t
@@ -0,0 +1,7 @@
use Test::More;
eval "use File::Find::Rule::BOM;";
plan skip_all => "skip the no BOM test because $@" if $@;
my @foo = File::Find::Rule->bom->in('lib', 't', 'xt');
ok(scalar(@foo) == 0, 'No BOM')
or diag(join("\t", map { "'$_' has BOM." } @foo));
done_testing;

0 comments on commit d69e8cc

Please sign in to comment.