Skip to content

Commit

Permalink
Add test for dependent modules
Browse files Browse the repository at this point in the history
  • Loading branch information
oalders committed Feb 23, 2022
1 parent b61a8e0 commit 9532062
Show file tree
Hide file tree
Showing 2 changed files with 43 additions and 0 deletions.
27 changes: 27 additions & 0 deletions .github/workflows/test-dependents.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,27 @@
---
name: test dependent modules

on:
workflow_dispatch:

jobs:
build-and-test-job:
name: Build distribution
runs-on: ubuntu-20.04
container:
image: perldocker/perl-tester:5.34
steps:
- uses: actions/checkout@v2
- 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: 0
run: auto-build-and-test-dist
- name: Test Dependents
env:
TEST_DEPENDENTS: 1
run: prove -l xt/dependent-modules.t
16 changes: 16 additions & 0 deletions xt/dependent-modules.t
Original file line number Diff line number Diff line change
@@ -0,0 +1,16 @@
use strict;
use warnings;

use Test::DependentModules qw( test_modules );
use Test::More;

my @modules = ('Perl::Critic');

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

}

done_testing();

0 comments on commit 9532062

Please sign in to comment.