Skip to content

Commit

Permalink
test: Don't use perl lib cache for ubuntu ci tests
Browse files Browse the repository at this point in the history
Better install missing packages
  • Loading branch information
g-bougard committed Sep 22, 2022
1 parent 3b6342e commit 654ac16
Showing 1 changed file with 13 additions and 16 deletions.
29 changes: 13 additions & 16 deletions .github/workflows/glpi-agent-ci.yml
Original file line number Diff line number Diff line change
Expand Up @@ -17,31 +17,28 @@ jobs:

steps:
- uses: actions/checkout@v2
- name: Install cpanminus
- name: Install packages
run: |
sudo apt -y install cpanminus libmodule-install-perl
sudo apt -y install cpanminus libmodule-install-perl \
libxml-treepp-perl libxml-xpath-perl \
libdatetime-perl libparallel-forkmanager-perl libparse-edid-perl \
libcpanel-json-xs-perl libossp-uuid-perl libfile-copy-recursive-perl \
libtext-template-perl libuniversal-require-perl libnet-ip-perl \
libnet-snmp-perl libipc-run-perl libhttp-proxy-perl libio-capture-perl \
libhttp-server-simple-perl libhttp-server-simple-authen-perl \
libtest-compile-perl libtest-deep-perl libtest-exception-perl \
libtest-mockmodule-perl libtest-mockobject-perl libtest-nowarnings-perl \
libtest-exception-perl libtest-perl-critic-perl libtest-pod-perl \
libtest-cpan-meta-perl
- name: Check environment
id: check-version
run: |
perl --version
cpanm --version
# Compute perl-version for current week to regen perl lib cache at least each week
perl -e '@t = localtime; print "::set-output name=cache-version::".$^V."-".int($t[7]/7)."\n"'
- name: Restore perl lib cache
id: cache
uses: pat-s/always-upload-cache@v3
with:
path: |
/usr/local/share/perl
/usr/local/lib/x86_64-linux-gnu/perl
/usr/local/bin
key: linux-ubuntu-test-perl-${{ steps.check-version.outputs.cache-version }}-lib-cache-${{ hashFiles('Makefile.PL', '.github/workflows/glpi-agent-ci.yml') }}
- name: Install deps
if: steps.cache.outputs.cache-hit != 'true'
run: |
cpanm --sudo --installdeps --verbose --notest .
cpanm --sudo --verbose --notest Parse::EDID
cpanm --sudo --verbose --notest Test::Perl::Critic Test::Vars Test::Pod Test::Pod::Spelling::CommonMistakes Test::Whitespaces Test::CPAN::Meta
cpanm --sudo --verbose --notest Test::Vars Test::Pod::Spelling::CommonMistakes Test::Whitespaces
- name: Run make
run: |
perl Makefile.PL
Expand Down

0 comments on commit 654ac16

Please sign in to comment.