Skip to content

Commit

Permalink
Play with dependents testing
Browse files Browse the repository at this point in the history
  • Loading branch information
nigelhorne committed Jan 27, 2024
1 parent dba23bc commit abf6962
Show file tree
Hide file tree
Showing 3 changed files with 49 additions and 0 deletions.
28 changes: 28 additions & 0 deletions .github/workflows/dependents.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,28 @@
---
name: test dependent modules
# https://raw.githubusercontent.com/libwww-perl/URI/master/.github/workflows/test-dependents.yml

on:
workflow_dispatch:

jobs:
build-and-test-job:
name: Build distribution
runs-on: ubuntu-20.04
container:
image: perldocker/perl-tester:5.36
steps:
- uses: actions/checkout@v3
- name: install extra modules
run: cpm install -g Test::DependentModules
- name: Run Tests
env:
AUTHOR_TESTING: 0
AUTOMATED_TESTING: 1
EXTENDED_TESTING: 1
RELEASE_TESTING: 1
run: auto-build-and-test-dist
- name: Test Dependents
env:
AUTHOR_TESTING: 1
run: prove -l t/dependent-modules.t
2 changes: 2 additions & 0 deletions Makefile.PL
Original file line number Diff line number Diff line change
Expand Up @@ -27,7 +27,9 @@ WriteMakefile(
'JSON::PP' => 4.02, # Fix http://www.cpantesters.org/cpan/report/78a1401c-42de-11e9-bf31-80c71e9d5857
'Test::Carp' => 0,
'Test::Compile' => 0,
'Test::DependentModules' => 0,
'Test::Most' => 0,
'Test::Needs' => 0,
'Test::NoWarnings' => 0,
'Test::Script' => 1.12,
'Test::CleanNamespaces' => 0,
Expand Down
19 changes: 19 additions & 0 deletions t/dependent-modules.t
Original file line number Diff line number Diff line change
@@ -0,0 +1,19 @@
# https://raw.githubusercontent.com/libwww-perl/URI/master/xt/dependent-modules.t
#
use strict;
use warnings;

use Test::Needs qw(Test::DependentModules);
use Test::DependentModules qw(test_modules);
use Test::Most;

my @modules = ('CGI::Lingua');

SKIP: {
skip '$ENV{AUTHOR_TESTING} not set', scalar @modules
unless $ENV{'AUTHOR_TESTING'};
delete $ENV{'AUTHOR_TESTING'};
test_modules(@modules);
}

done_testing();

0 comments on commit abf6962

Please sign in to comment.