├── .github └── workflows │ └── enforce-license-compliance.yml ├── .gitignore ├── .travis.yml ├── Build.PL ├── LICENSE.md ├── META.json ├── README.md ├── circle.yml ├── cpanfile ├── github.yml ├── lib └── Example.pm └── t └── 00_compile.t /.github/workflows/enforce-license-compliance.yml: -------------------------------------------------------------------------------- 1 | name: Enforce License Compliance 2 | 3 | on: 4 | pull_request: 5 | branches: [main, master] 6 | 7 | jobs: 8 | enforce-license-compliance: 9 | runs-on: ubuntu-latest 10 | steps: 11 | - name: 'Enforce License Compliance' 12 | uses: getsentry/action-enforce-license-compliance@57ba820387a1a9315a46115ee276b2968da51f3d # main 13 | with: 14 | fossa_api_key: ${{ secrets.FOSSA_API_KEY }} 15 | -------------------------------------------------------------------------------- /.gitignore: -------------------------------------------------------------------------------- 1 | /.build/ 2 | /_build/ 3 | /Build 4 | /Build.bat 5 | /blib 6 | /Makefile 7 | /pm_to_blib 8 | 9 | /carton.lock 10 | /.carton/ 11 | /local/ 12 | 13 | nytprof.out 14 | nytprof/ 15 | 16 | cover_db/ 17 | 18 | *.bak 19 | *.old 20 | *~ 21 | *.swp 22 | *.o 23 | *.obj 24 | 25 | !LICENSE 26 | 27 | /_build_params 28 | 29 | MYMETA.* 30 | 31 | /Example-* 32 | -------------------------------------------------------------------------------- /.travis.yml: -------------------------------------------------------------------------------- 1 | language: perl 2 | perl: 3 | - "5.18" 4 | - "5.26" 5 | 6 | before_script: 7 | - cpanm --quiet --notest --skip-satisfied Devel::Cover::Report::Codecov 8 | 9 | script: 10 | - perl Build.PL 11 | - ./Build build 12 | - cover -test 13 | 14 | after_success: 15 | - travis_retry cover -report codecov 16 | 17 | notifications: 18 | slack: 19 | - secure: "r4GAkoU2sNwXuF+jUwpGlJct/p4wITonNvw3ToQoDrBhk5sPN3DA1DhvOKDu4Ona7ULcWVyYrj33E+ZrAnNcVNnqusYvdIJ61ot8s7sYqABYhufp0E8mYDXZGnxeMft9YB9u/MCMgqypJl3elYQbt/kWuX4iacn/zoW7BudhRltD/WpLZMfeMJO6eICtal0UdDGvSn3Kuw1+pscq63blJnAza4du77+o/U8JFK7haJZ7bAUV7VgY5sA/mTVQx2bBd37/LQA8mSsm39aeGX8tpljw9wV0rDHJ5Dmdytr9gfudo3xIi0Pf7NGS0+rGqLrSMb3w14AlGl+YEMd2O1JMmYkB8A1hWudAhVFyX4S/3dmJRm1q8IXn0bJTflX+oDN6DUju7IkZqbhMFzp8MFmz+5NJPGnyT1vInug7fIPI5Sz8OjSFZN0wB9bDyGtABEXvIV5lzCcvxoSpu7COlF4lvhtpjy9BcXx8ARU5Fb/9OgtArnha8u8EhFQRt2+f/AepLjWnUgLX9yEnHUu9QzTSeS4emv94jKww+4zoBgPYZgIo1qjgra4qBq1v8qjmusydcgQ/KlumfGS2QAOZGZtsSwMT8WRg0JTSlJVISfEjNeBH/LwbH5qCa6oxIyX3gavNMwEFbc+X//TYW75gBOVPlA6YVzs5REfn5/IpnJvCi40=" 20 | 21 | -------------------------------------------------------------------------------- /Build.PL: -------------------------------------------------------------------------------- 1 | # ========================================================================= 2 | # THIS FILE IS AUTOMATICALLY GENERATED BY MINILLA. 3 | # DO NOT EDIT DIRECTLY. 4 | # ========================================================================= 5 | 6 | use 5.008_001; 7 | use strict; 8 | 9 | use Module::Build::Tiny 0.035; 10 | 11 | Build_PL(); 12 | 13 | -------------------------------------------------------------------------------- /LICENSE.md: -------------------------------------------------------------------------------- 1 | MIT License 2 | 3 | Copyright (c) 2022 Codecov 4 | 5 | Permission is hereby granted, free of charge, to any person obtaining a copy 6 | of this software and associated documentation files (the "Software"), to deal 7 | in the Software without restriction, including without limitation the rights 8 | to use, copy, modify, merge, publish, distribute, sublicense, and/or sell 9 | copies of the Software, and to permit persons to whom the Software is 10 | furnished to do so, subject to the following conditions: 11 | 12 | The above copyright notice and this permission notice shall be included in all 13 | copies or substantial portions of the Software. 14 | 15 | THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR 16 | IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, 17 | FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE 18 | AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER 19 | LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, 20 | OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE 21 | SOFTWARE. 22 | -------------------------------------------------------------------------------- /META.json: -------------------------------------------------------------------------------- 1 | { 2 | "abstract" : "It's new $module", 3 | "author" : [ 4 | "Pine Mizune " 5 | ], 6 | "dynamic_config" : 0, 7 | "generated_by" : "Minilla/v2.5.0, CPAN::Meta::Converter version 2.150005", 8 | "license" : [ 9 | "perl_5" 10 | ], 11 | "meta-spec" : { 12 | "url" : "http://search.cpan.org/perldoc?CPAN::Meta::Spec", 13 | "version" : "2" 14 | }, 15 | "name" : "Example", 16 | "no_index" : { 17 | "directory" : [ 18 | "t", 19 | "xt", 20 | "inc", 21 | "share", 22 | "eg", 23 | "examples", 24 | "author", 25 | "builder" 26 | ] 27 | }, 28 | "prereqs" : { 29 | "configure" : { 30 | "requires" : { 31 | "Module::Build::Tiny" : "0.035" 32 | } 33 | }, 34 | "develop" : { 35 | "requires" : { 36 | "Test::CPAN::Meta" : "0", 37 | "Test::MinimumVersion::Fast" : "0.04", 38 | "Test::PAUSE::Permissions" : "0.04", 39 | "Test::Pod" : "1.41", 40 | "Test::Spellunker" : "v0.2.7" 41 | } 42 | }, 43 | "runtime" : { 44 | "requires" : { 45 | "perl" : "5.008001" 46 | } 47 | }, 48 | "test" : { 49 | "requires" : { 50 | "Test::More" : "0.98" 51 | } 52 | } 53 | }, 54 | "release_status" : "unstable", 55 | "version" : "0.01", 56 | "x_authority" : "cpan:PINE", 57 | "x_serialization_backend" : "JSON::PP version 2.27203" 58 | } 59 | -------------------------------------------------------------------------------- /README.md: -------------------------------------------------------------------------------- 1 | # [Codecov](https://codecov.io) Perl example 2 | 3 | [![Build Status](https://travis-ci.org/codecov/example-clojure.svg?branch=master)](https://travis-ci.org/codecov/example-clojure) 4 | [![codecov.io](https://codecov.io/github/codecov/example-clojure/coverage.svg?branch=master)](https://codecov.io/github/codecov/example-clojure?branch=master) 5 | [![FOSSA Status](https://app.fossa.com/api/projects/git%2Bgithub.com%2Fcodecov%2Fexample-perl.svg?type=shield)](https://app.fossa.com/projects/git%2Bgithub.com%2Fcodecov%2Fexample-perl?ref=badge_shield) 6 | 7 | ## Guide 8 | ### CI Setup 9 | 10 | #### [![circleci](https://avatars0.githubusercontent.com/u/1231870?v=2&s=50)](https://circleci.com/) Circle CI (1.0) 11 | > Append to your `circle.yml` file 12 | 13 | ```yml 14 | machine: 15 | environment: 16 | PATH: ~/perl5/bin:$PATH 17 | 18 | dependencies: 19 | pre: 20 | - curl -L https://cpanmin.us | perl - App::cpanminus 21 | - cpanm --local-lib=~/perl5 local::lib && echo "eval $(perl -I ~/perl5/lib/perl5/ -Mlocal::lib)" >> ~/.bashrc 22 | - cpanm --quiet --notest --skip-satisfied Devel::Cover::Report::Codecov 23 | 24 | test: 25 | override: 26 | - perl Build.PL 27 | - ./Build build 28 | - cover -test 29 | 30 | post: 31 | - cover -report codecov 32 | ``` 33 | 34 | #### [![codeship](https://avatars1.githubusercontent.com/u/2988541?v=2&s=50)](https://codeship.io/) Codeship 35 | > Append to your `Setup Commands` 36 | 37 | ```sh 38 | curl -L https://cpanmin.us | perl - App::cpanminus 39 | export PATH=~/perl5/bin:$PATH 40 | cpanm --local-lib=~/perl5 local::lib && eval $(perl -I ~/perl5/lib/perl5/ -Mlocal::lib) 41 | cpanm --quiet --installdeps --notest . 42 | cpanm --quiet --notest --skip-satisfied Devel::Cover::Report::Codecov 43 | ``` 44 | 45 | > Append to your `Test Commands` 46 | 47 | ```sh 48 | perl Build.PL 49 | ./Build build 50 | cover -test -report codecov 51 | ``` 52 | 53 | #### Travis 54 | Add to your `.travis.yml` file. 55 | ```yml 56 | language: perl 57 | 58 | before_script: 59 | - cpanm --quiet --notest --skip-satisfied Devel::Cover::Report::Codecov 60 | 61 | script: 62 | - perl Build.PL 63 | - ./Build build 64 | - cover -test 65 | 66 | after_success: 67 | - cover -report codecov 68 | ``` 69 | 70 | #### GitHub Action 71 | 72 | Add to your `.github/workflows/main.yml` file 73 | ```yml 74 | jobs: 75 | codecov: 76 | runs-on: ubuntu-latest 77 | container: perl:latest 78 | steps: 79 | - uses: actions/checkout@v2 80 | - name: Run codecov GitHub Action 81 | env: 82 | CODECOV_TOKEN: ${{ secrets.CODECOV_TOKEN }} 83 | run: | 84 | cpanm --quiet --notest Module::Build Devel::Cover Devel::Cover::Report::Codecovbash 85 | perl Build.PL 86 | cover -test -report codecov 87 | ``` 88 | 89 | Note that you need to link your GitHub repo to your codecov first and then add the `CODECOV_TOKEN` as a secret to your GitHub repository. 90 | 91 | ### Producing Coverage Reports 92 | ``` 93 | cover -report codecov 94 | ``` 95 | 96 | 97 | ## Caveats 98 | ### Private Repos 99 | Repository tokens are required for (a) all private repos, (b) public repos not using Travis-CI, CircleCI or AppVeyor. Find your repository token at Codecov and provide via appending `-t ` to you where you upload reports. 100 | 101 | ## Links 102 | - [Community Boards](https://community.codecov.io) 103 | - [Support](https://codecov.io/support) 104 | - [Documentation](https://docs.codecov.io) 105 | 106 | ## License 107 | MIT. 108 | 109 | Originally authored by [Jakub Elżbieciak](https://elzbieciak.pl/). 110 | 111 | 112 | [![FOSSA Status](https://app.fossa.com/api/projects/git%2Bgithub.com%2Fcodecov%2Fexample-perl.svg?type=large)](https://app.fossa.com/projects/git%2Bgithub.com%2Fcodecov%2Fexample-perl?ref=badge_large) 113 | -------------------------------------------------------------------------------- /circle.yml: -------------------------------------------------------------------------------- 1 | machine: 2 | environment: 3 | PATH: ~/perl5/bin:$PATH 4 | 5 | dependencies: 6 | pre: 7 | - curl -L https://cpanmin.us | perl - App::cpanminus 8 | - cpanm --local-lib=~/perl5 local::lib && echo "eval $(perl -I ~/perl5/lib/perl5/ -Mlocal::lib)" >> ~/.bashrc 9 | - cpanm --quiet --notest --skip-satisfied Devel::Cover Devel::Cover::Report::Codecov 10 | 11 | test: 12 | override: 13 | - perl Build.PL 14 | - ./Build build 15 | - cover -test 16 | 17 | post: 18 | - cover -report codecov 19 | -------------------------------------------------------------------------------- /cpanfile: -------------------------------------------------------------------------------- 1 | requires 'perl', '5.008001'; 2 | 3 | on 'test' => sub { 4 | requires 'Test::More', '0.98'; 5 | }; 6 | 7 | -------------------------------------------------------------------------------- /github.yml: -------------------------------------------------------------------------------- 1 | name: Codecov 2 | 3 | on: 4 | push: 5 | 6 | jobs: 7 | coverage: 8 | runs-on: ubuntu-latest 9 | container: perl:latest 10 | steps: 11 | - uses: actions/checkout@v2 12 | - name: Run codecov GitHub Action 13 | env: 14 | CODECOV_TOKEN: ${{ secrets.CODECOV_TOKEN }} 15 | run: | 16 | cpanm --quiet --notest Module::Build Devel::Cover Devel::Cover::Report::Codecov 17 | perl Build.PL 18 | cover -test -report codecov 19 | 20 | -------------------------------------------------------------------------------- /lib/Example.pm: -------------------------------------------------------------------------------- 1 | package Example; 2 | use 5.008001; 3 | use strict; 4 | use warnings; 5 | 6 | our $VERSION = "0.01"; 7 | 8 | 9 | 10 | 1; 11 | __END__ 12 | 13 | =encoding utf-8 14 | 15 | =head1 NAME 16 | 17 | Example - It's new $module 18 | 19 | =head1 SYNOPSIS 20 | 21 | use Example; 22 | 23 | =head1 DESCRIPTION 24 | 25 | Example is ... 26 | 27 | =head1 LICENSE 28 | 29 | Copyright (C) Pine Mizune. 30 | 31 | This library is free software; you can redistribute it and/or modify 32 | it under the same terms as Perl itself. 33 | 34 | =head1 AUTHOR 35 | 36 | Pine Mizune Epinemz@gmail.comE 37 | 38 | =cut 39 | 40 | -------------------------------------------------------------------------------- /t/00_compile.t: -------------------------------------------------------------------------------- 1 | use strict; 2 | use Test::More 0.98; 3 | 4 | use_ok $_ for qw( 5 | Example 6 | ); 7 | 8 | done_testing; 9 | 10 | --------------------------------------------------------------------------------