GA4 #93
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
name: CI | |
on: | |
push: | |
pull_request: | |
workflow_dispatch: | |
jobs: | |
test: | |
runs-on: ${{ matrix.os }} | |
strategy: | |
matrix: | |
os: [ 'ubuntu-latest' ] | |
perl: [ 'latest' ] | |
name: Perl ${{ matrix.perl }} on ${{ matrix.os }} | |
steps: | |
- name: Check out code | |
uses: actions/checkout@v4 | |
- name: Set up perl | |
uses: shogo82148/actions-setup-perl@v1 | |
with: | |
perl-version: ${{ matrix.perl }} | |
- name: Install libs | |
run: sudo apt-get update && sudo apt-get install libxml2 libxml2-dev | |
- name: Perl version | |
run: perl -V | |
- name: Install Alien::TidyHTML5 | |
run: cpanm --notest Alien::TidyHTML5 | |
- name: Install Test::Exception | |
run: cpanm --notest Test::Exception | |
- name: Install CPAN modules | |
run: cpanm --notest --installdeps . | |
- name: Run tests | |
run: prove -lv t | |
- name: Archive CPAN logs | |
if: ${{ failure() }} | |
uses: actions/upload-artifact@v4 | |
with: | |
name: cpan_log | |
path: /home/runner/.cpanm/work/*/build.log | |
retention-days: 5 | |
coverage: | |
runs-on: ubuntu-latest | |
container: davorg/perl-coveralls:latest | |
name: Test coverage | |
steps: | |
- uses: actions/checkout@v4 | |
- name: Install libs | |
run: apt-get update && apt-get install -y libxml2 libxml2-dev | |
- name: Install Alien::TidyHTML5 | |
run: cpanm --notest Alien::TidyHTML5 | |
- name: Install Test::Exception | |
run: cpanm --notest Test::Exception | |
- name: Install modules | |
run: cpanm -n --installdeps . | |
- name: Coverage | |
env: | |
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }} | |
run: cover -test -report Coveralls | |
perlcritic: | |
uses: PerlToolsTeam/github_workflows/.github/workflows/cpan-perlcritic.yml@main | |
complexity: | |
uses: PerlToolsTeam/github_workflows/.github/workflows/cpan-complexity.yml@main |