diff --git a/.github/workflows/codecov.yml b/.github/workflows/codecov.yml new file mode 100644 index 0000000..302ae40 --- /dev/null +++ b/.github/workflows/codecov.yml @@ -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 }} diff --git a/.github/workflows/coveralls.yml b/.github/workflows/coveralls.yml new file mode 100644 index 0000000..dd07dda --- /dev/null +++ b/.github/workflows/coveralls.yml @@ -0,0 +1,40 @@ +--- +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 Dependencies + run: | + cpanm --quiet --notest --installdeps . + cpanm --quiet --notest Module::Build Devel::Cover Devel::Cover::Report::Coveralls + - name: Build module + run: | + perl Makefile.PL + make + env: + AUTHOR_TESTING: 1 + AUTOMATED_TESTING: 1 + - name: Submit coveralls + run: | + cover -test + cover -report coveralls + # ./codecov -t ${{ secrets.COVERALLS_TOKEN }} -f cover_db/codecov.json + env: + GITHUB_TOKEN: ${{ secrets.COVERALLS_TOKEN }} diff --git a/.github/workflows/test.yml b/.github/workflows/test.yml index 1383d72..ea69f11 100644 --- a/.github/workflows/test.yml +++ b/.github/workflows/test.yml @@ -32,7 +32,7 @@ jobs: - run: perl -V - name: Install Dependencies run: | - cpanm -iqn --skip-satisfied File::Spec ExtUtils::MakeMaker Devel::Cover::Report::Codecov + cpanm -iqn --skip-satisfied File::Spec ExtUtils::MakeMaker cpanm -iqn --skip-satisfied Test::Script Test::Pod::Spelling::CommonMistakes Test::Portability::Files Test::Taint Test::Carp Test::Pod::Coverage cpanm -iqn --skip-satisfied --installdeps --notest . - name: Make Module @@ -40,15 +40,18 @@ jobs: # find . -name build.log | xargs cat perl Makefile.PL make + env: + AUTHOR_TESTING: 1 + AUTOMATED_TESTING: 1 - name: Run Tests - # run: prove -l -b t - run: | - cover -test - cover -report codecov - curl -Os https://uploader.codecov.io/latest/macos/codecov - chmod +x codecov - ./codecov -t ${{ secrets.CODECOV_TOKEN }} + run: prove -l -b t + # run: | + # cover -test + # cover -report codecov + # curl -Os https://uploader.codecov.io/latest/macos/codecov + # chmod +x codecov + # ./codecov -t ${{ secrets.CODECOV_TOKEN }} env: AUTHOR_TESTING: 1 AUTOMATED_TESTING: 1 - CODECOV_TOKEN: ${{ secrets.CODECOV_TOKEN }} + # CODECOV_TOKEN: ${{ secrets.CODECOV_TOKEN }}