diff --git a/.github/workflows/ci.yml b/.github/workflows/ci.yml index b0c2f2d..914e21d 100644 --- a/.github/workflows/ci.yml +++ b/.github/workflows/ci.yml @@ -1,6 +1,12 @@ name: CI -on: [push] +on: + push: + branches: + - master + pull_request: + branches: + - master jobs: perl-job: @@ -22,10 +28,14 @@ jobs: - name: Install libraries and cpm run: | apt update && apt -y install libprotobuf-dev libprotoc-dev - cpanm install App::cpm + cpanm local::lib + eval "$(perl -I$HOME/perl5/lib/perl5 -Mlocal::lib)" + cpanm --mirror http://cpanproxy/ --mirror-only --notest App::cpm - name: Install depedencies run: | - cpm install -v --resolver 02packages,http://cpanproxy/ --configure-timeout 180 --build-timeout 600 --cpanfile=./cpanfile + eval "$(perl -I$HOME/perl5/lib/perl5 -Mlocal::lib)" + cpm install -g -v --no-test --resolver 02packages,http://cpanproxy/ --configure-timeout 180 --build-timeout 600 --cpanfile=./cpanfile - name: Run tests run: | - bin/run-tests + eval "$(perl -I$HOME/perl5/lib/perl5 -Mlocal::lib)" + prove diff --git a/cpanfile b/cpanfile index e5af0c2..bb9deed 100644 --- a/cpanfile +++ b/cpanfile @@ -79,3 +79,4 @@ requires "WWW::Mechanize"; requires "WWW::Shorten"; requires "WWW::Shorten::TinyURL"; requires "XML::RSS::Parser"; +requires "Test::Differences";