Skip to content

Commit

Permalink
Try new coverage
Browse files Browse the repository at this point in the history
  • Loading branch information
nigelhorne committed Aug 30, 2024
1 parent 74fe843 commit 2f2e142
Show file tree
Hide file tree
Showing 3 changed files with 50 additions and 6 deletions.
45 changes: 45 additions & 0 deletions .github/workflows/codecov.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,45 @@
---
# https://github.com/codecov/example-perl/blob/master/github.yml
name: Code coverage - codecov.io

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

jobs:
build:
runs-on: ubuntu-latest
name: codecov
container:
image: perl:stable
steps:
- uses: actions/checkout@v4
- uses: codecov/codecov-action@v4
- name: Install Dependencies
run: |
cpanm --quiet --notest --installdeps .
cpanm --quiet --notest Module::Build Devel::Cover Devel::Cover::Report::Codecov
- name: Build module
run: |
perl Makefile.PL
make
env:
AUTHOR_TESTING: 1
AUTOMATED_TESTING: 1
- name: Download codecov
run: |
# Replace `linux` below with the appropriate OS
# Options are `alpine`, `linux`, `macos`, `windows`
# curl -Os https://uploader.codecov.io/latest/linux/codecov
# chmod +x codecov
- name: Submit codecov
run: |
cover -test
cover -report codecov
# ./codecov -t ${{ secrets.CODECOV_TOKEN }} -f cover_db/codecov.json
env:
CODECOV_TOKEN: ${{ secrets.CODECOV_TOKEN }}
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
---
name: Code coverage
name: Code coverage - coveralls.io

on:
pull_request:
Expand All @@ -11,8 +11,8 @@ on:

jobs:
build:
runs-on: 'ubuntu-latest'
name: Coverage
runs-on: ubuntu-latest
name: coveralls
container:
image: perl:stable
steps:
Expand All @@ -22,5 +22,4 @@ jobs:
- run: PERL5OPT="-MDevel::Cover" yath test --qvf t/
- run: cover -report coveralls
env:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
CODECOV_TOKEN: ${{ secrets.CODECOV_TOKEN }}
GITHUB_TOKEN: ${{ secrets.COVERALLS_TOKEN }}
2 changes: 1 addition & 1 deletion t/no404s.t
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
#!perl -wT
#!perl -w

use strict;
use warnings;
Expand Down

0 comments on commit 2f2e142

Please sign in to comment.