Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Use Test::Needs in t/locally-defined-sub.t #113

Merged
merged 3 commits into from
Jul 4, 2024
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
11 changes: 6 additions & 5 deletions .github/dependabot.yml
Original file line number Diff line number Diff line change
@@ -1,7 +1,8 @@
---
version: 2
updates:
- package-ecosystem: "github-actions"
directory: "/"
schedule:
# Check for updates to GitHub Actions every week
interval: "weekly"
- package-ecosystem: 'github-actions'
directory: '/'
schedule:
# Check for updates to GitHub Actions every week
interval: 'weekly'
168 changes: 85 additions & 83 deletions .github/workflows/dzil-build-and-test.yml
Original file line number Diff line number Diff line change
Expand Up @@ -4,18 +4,18 @@ name: dzil build and test
on:
push:
branches:
- "main"
- 'main'
pull_request:
branches:
- "*"
- '*'
workflow_dispatch:

jobs:
build-job:
name: Build distribution
runs-on: ubuntu-20.04
container:
image: perldocker/perl-tester:5.38
image: perldocker/perl-tester:5.40
steps:
- uses: actions/checkout@v4
- name: Install ubi
Expand All @@ -42,73 +42,73 @@ jobs:
path: build_dir
if: ${{ github.actor != 'nektos/act' }}
#integration-job:
#needs: build-job
#runs-on: ubuntu-20.04
#timeout-minutes: 15
#container:
#image: perldocker/perl-tester:5.32
#strategy:
#fail-fast: false
#steps:
#- uses: actions/download-artifact@v4
#with:
#name: build_dir
#path: .
#- name: install test-needs deps
#run: cpm install -g --cpanfile test-needs-cpanfile
#- name: Install deps and test
#run: cpan-install-dist-deps && test-dist
#- uses: actions/checkout@v4
#with:
#repository: mojolicious/mojo
#path: mojo
#fetch-depth: 0
#name: check out Mojo
#- name: Install Mojo
#run: cpm install -g Mojo
#- name: check out a tag
#run: cd mojo && git checkout v8.72
#- name: run Mojo tests
#run: cd mojo && prove -lr t
#env:
#TEST_EV: 1
#TEST_HYPNOTOAD: 1
#TEST_MORBO: 1
#TEST_ONLINE: 1
#TEST_UNIX: 1
#- name: Run perlimports on test suite
#run: cd mojo && find t -type f | grep "\.t\$" | grep -v t/mojolicious/commands.t | xargs -L 1 perl -I../lib ../script/perlimports --libs lib,t/mojo/lib -i --no-padding --ignore-modules Test::More,Mojo::Base -f
#- name: run Mojo tests after tidying tests
#run: cd mojo && prove -lr t
#env:
#TEST_EV: 1
#TEST_HYPNOTOAD: 1
#TEST_MORBO: 1
#TEST_ONLINE: 1
#TEST_UNIX: 1
#- name: Hard reset on Mojo checkout
#run: cd mojo && git reset --hard
#- name: Run perlimports on lib
#run: cd mojo && find lib -type f | grep "\.pm\$" | grep -v lib/Mojo/Base.pm | xargs -n 1 perl -I../lib ../script/perlimports -i --libs lib --no-padding -f
#env:
#TEST_EV: 1
#TEST_HYPNOTOAD: 1
#TEST_MORBO: 1
#TEST_ONLINE: 1
#TEST_UNIX: 1
#- name: run Mojo tests after tidying lib
#run: cd mojo && prove -lr t
#env:
#TEST_EV: 1
#TEST_HYPNOTOAD: 1
#TEST_MORBO: 1
#TEST_ONLINE: 1
#TEST_UNIX: 1
#needs: build-job
#runs-on: ubuntu-20.04
#timeout-minutes: 15
#container:
#image: perldocker/perl-tester:5.32
#strategy:
#fail-fast: false
#steps:
#- uses: actions/download-artifact@v4
#with:
#name: build_dir
#path: .
#- name: install test-needs deps
#run: cpm install -g --cpanfile test-needs-cpanfile
#- name: Install deps and test
#run: cpan-install-dist-deps && test-dist
#- uses: actions/checkout@v4
#with:
#repository: mojolicious/mojo
#path: mojo
#fetch-depth: 0
#name: check out Mojo
#- name: Install Mojo
#run: cpm install -g Mojo
#- name: check out a tag
#run: cd mojo && git checkout v8.72
#- name: run Mojo tests
#run: cd mojo && prove -lr t
#env:
#TEST_EV: 1
#TEST_HYPNOTOAD: 1
#TEST_MORBO: 1
#TEST_ONLINE: 1
#TEST_UNIX: 1
#- name: Run perlimports on test suite
#run: cd mojo && find t -type f | grep "\.t\$" | grep -v t/mojolicious/commands.t | xargs -L 1 perl -I../lib ../script/perlimports --libs lib,t/mojo/lib -i --no-padding --ignore-modules Test::More,Mojo::Base -f
#- name: run Mojo tests after tidying tests
#run: cd mojo && prove -lr t
#env:
#TEST_EV: 1
#TEST_HYPNOTOAD: 1
#TEST_MORBO: 1
#TEST_ONLINE: 1
#TEST_UNIX: 1
#- name: Hard reset on Mojo checkout
#run: cd mojo && git reset --hard
#- name: Run perlimports on lib
#run: cd mojo && find lib -type f | grep "\.pm\$" | grep -v lib/Mojo/Base.pm | xargs -n 1 perl -I../lib ../script/perlimports -i --libs lib --no-padding -f
#env:
#TEST_EV: 1
#TEST_HYPNOTOAD: 1
#TEST_MORBO: 1
#TEST_ONLINE: 1
#TEST_UNIX: 1
#- name: run Mojo tests after tidying lib
#run: cd mojo && prove -lr t
#env:
#TEST_EV: 1
#TEST_HYPNOTOAD: 1
#TEST_MORBO: 1
#TEST_ONLINE: 1
#TEST_UNIX: 1
coverage-job:
needs: build-job
runs-on: ubuntu-20.04
container:
image: perldocker/perl-tester:5.38
image: perldocker/perl-tester:5.40
steps:
- uses: actions/checkout@v4 # codecov wants to be inside a Git repository
- uses: actions/download-artifact@v4
Expand All @@ -123,7 +123,7 @@ jobs:
env:
CODECOV_TOKEN: ${{secrets.CODECOV_TOKEN}}
HARNESS_OPTIONS: j2
HARNESS_PERL_SWITCHES: "-MDevel::Cover=+ignore,^local/|^t/|^xt|^test-data"
HARNESS_PERL_SWITCHES: '-MDevel::Cover=+ignore,^local/|^t/|^xt|^test-data'
- name: Upload coverage reports to Codecov with GitHub Action
uses: codecov/codecov-action@v4
test-job:
Expand All @@ -134,17 +134,18 @@ jobs:
matrix:
os: [ubuntu-20.04, macos-latest]
perl-version:
- "5.18"
- "5.20"
- "5.22"
- "5.24"
- "5.26"
- "5.28"
- "5.30"
- "5.32"
- "5.34"
- "5.36"
- "5.38"
- '5.18'
- '5.20'
- '5.22'
- '5.24'
- '5.26'
- '5.28'
- '5.30'
- '5.32'
- '5.34'
- '5.36'
- '5.38'
- '5.40'
name: More deps ${{ matrix.perl-version }} on ${{ matrix.os }}
steps:
- name: Set Up Perl
Expand All @@ -161,8 +162,8 @@ jobs:
- name: install deps using cpm
uses: perl-actions/install-with-cpm@v1
with:
cpanfile: "cpanfile"
args: "--with-suggests --with-test --with-develop"
cpanfile: 'cpanfile'
args: '--with-suggests --with-test --with-develop'
- run: prove -lr -j2 t
without-test-needs-job:
needs: build-job
Expand All @@ -184,7 +185,8 @@ jobs:
#- "5.30"
#- "5.32"
# - "5.34"
- "5.38"
# - '5.38'
- '5.40'
name: Fewer deps ${{ matrix.perl-version }} on ${{ matrix.os }}
steps:
- name: Set Up Perl
Expand All @@ -198,6 +200,6 @@ jobs:
- name: install deps using cpm
uses: perl-actions/install-with-cpm@v1
with:
cpanfile: "cpanfile"
args: "--with-test"
cpanfile: 'cpanfile'
args: '--with-test'
- run: prove -lr -j2 t
1 change: 1 addition & 0 deletions t/locally-defined-sub.t
Original file line number Diff line number Diff line change
Expand Up @@ -6,6 +6,7 @@ use lib 't/lib', 'test-data/lib';
use Test::Differences qw( eq_or_diff );
use TestHelper qw( doc );
use Test::More import => [qw( done_testing )];
use Test::Needs qw( Math::Round );

my ( $doc, $log ) = doc(
filename => 'test-data/lib/Local/Round.pm', preserve_unused => 0,
Expand Down
Loading