diff --git a/.github/workflows/codecov.yml b/.github/workflows/codecov.yml index 302ae40..165712c 100644 --- a/.github/workflows/codecov.yml +++ b/.github/workflows/codecov.yml @@ -43,3 +43,4 @@ jobs: # ./codecov -t ${{ secrets.CODECOV_TOKEN }} -f cover_db/codecov.json env: CODECOV_TOKEN: ${{ secrets.CODECOV_TOKEN }} + AUTOMATED_TESTING: 1 diff --git a/.github/workflows/coveralls.yml b/.github/workflows/coveralls.yml new file mode 100644 index 0000000..c3afc78 --- /dev/null +++ b/.github/workflows/coveralls.yml @@ -0,0 +1,47 @@ +--- +name: Code coverage - coveralls.io + +on: + pull_request: + push: + branches: + - '*' + tags-ignore: + - '*' + +jobs: + build: + runs-on: ubuntu-latest + name: coveralls + container: + image: perl:stable + steps: + - uses: actions/checkout@v4 + # - run: cpanm --quiet --notest --installdeps . + # - run: cpanm --quiet --notest App::Yath Devel::Cover Devel::Cover::Report::Coveralls UUID + # - run: PERL5OPT="-MDevel::Cover" yath test --qvf t/ + - name: Install Programs + run: | + apt-get update + apt-get -y upgrade + apt-get -y install libwww-perl liblwp-protocol-https-perl cpanminus libdevel-cover-perl libmodule-build-perl + - name: Install Dependencies + run: | + cpanm --reinstall App::cpanminus + cpanm -iqn --installdeps . + cpanm --mirror https://cpan.org -iqn Devel::Cover::Report::Coveralls + - name: Build module + run: | + perl Makefile.PL + make + env: + AUTOMATED_TESTING: 1 + - name: Submit coveralls + run: | + git config --global --add safe.directory /__w/CGI-Info/CGI-Info + cover -test + cover -report coveralls + # ./codecov -t ${{ secrets.COVERALLS_TOKEN }} -f cover_db/codecov.json + env: + GITHUB_TOKEN: ${{ secrets.COVERALLS_TOKEN }} + AUTOMATED_TESTING: 1 diff --git a/Changes b/Changes index c14f247..b11d9f6 100644 --- a/Changes +++ b/Changes @@ -2,7 +2,7 @@ Revision history for Genealogy::ObituaryDailyTimes 0.13 search() can now just take one parameter which is the last name - Added CircleCI and Codecov + Added CircleCI, Coveralls and Codecov 0.12 Wed Jun 19 21:01:56 EDT 2024 t/carp.t could sometimes fail diff --git a/t/10-new.t b/t/10-new.t index 07a7401..e8984d0 100644 --- a/t/10-new.t +++ b/t/10-new.t @@ -7,6 +7,10 @@ use Test::Most tests => 4; use_ok('Genealogy::ObituaryDailyTimes'); +if($ENV{'NO_NETWORK_TESTING'}) { + Database::Abstraction::init(directory => '/tmp'); +} + isa_ok(Genealogy::ObituaryDailyTimes->new(), 'Genealogy::ObituaryDailyTimes', 'Creating Genealogy::ObituaryDailyTimes object'); isa_ok(Genealogy::ObituaryDailyTimes::new(), 'Genealogy::ObituaryDailyTimes', 'Creating Genealogy::ObituaryDailyTimes object'); isa_ok(Genealogy::ObituaryDailyTimes->new()->new(), 'Genealogy::ObituaryDailyTimes', 'Cloning Genealogy::ObituaryDailyTimes object');