From 773972d62448bb58288dbc07b8e4ec6aafc5b582 Mon Sep 17 00:00:00 2001 From: Steve Schnepp Date: Wed, 5 Jul 2023 11:45:51 +0200 Subject: [PATCH] build: adding a cache for the Devel-Cover-Report-Coveralls deb --- .github/workflows/build-n-test.yml | 32 ++++++++++++++++++++---------- 1 file changed, 22 insertions(+), 10 deletions(-) diff --git a/.github/workflows/build-n-test.yml b/.github/workflows/build-n-test.yml index df95c3c86..f83c440c7 100644 --- a/.github/workflows/build-n-test.yml +++ b/.github/workflows/build-n-test.yml @@ -29,19 +29,31 @@ jobs: - run: perl -V - - name: Devel-Cover-Report-Coveralls install deps - run: sudo apt-get install -y dh-make-perl libdevel-cover-perl libhttp-tiny-perl libio-socket-ssl-perl libjson-pp-perl libyaml-perl libmodule-build-tiny-perl - - name: Devel-Cover-Report-Coveralls fetch - run: cd /tmp && wget https://cpan.metacpan.org/authors/id/M/MI/MIKIHOSHI/Devel-Cover-Report-Coveralls-0.32.tar.gz - - name: Devel-Cover-Report-Coveralls uncompress - run: cd /tmp && tar zxvf Devel-Cover-Report-Coveralls-0.32.tar.gz - - name: Devel-Cover-Report-Coveralls create the package - run: cd /tmp && DEB_BUILD_OPTIONS=nocheck dh-make-perl make --build Devel-Cover-Report-Coveralls-0.32 + - name: Cache Devel-Cover-Report-Coveralls + id: cache-Devel-Cover-Report-Coveralls + uses: actions/cache@v3 + env: + cache-name: cache-Devel-Cover-Report-Coveralls + with: + # npm cache files are stored in `~/.npm` on Linux/macOS + path: /tmp/Devel-Cover-Report-Coveralls + key: ${{ runner.os }}-build-${{ env.cache-name }}-0.32 + + - if: ${{ steps.cache-Devel-Cover-Report-Coveralls.outputs.cache-hit != 'true' }} + name: List the state of node modules + continue-on-error: true + run: | + mkdir -p /tmp/Devel-Cover-Report-Coveralls + sudo apt-get install -y dh-make-perl libdevel-cover-perl libhttp-tiny-perl libio-socket-ssl-perl libjson-pp-perl libyaml-perl libmodule-build-tiny-perl + cd /tmp/Devel-Cover-Report-Coveralls && wget https://cpan.metacpan.org/authors/id/M/MI/MIKIHOSHI/Devel-Cover-Report-Coveralls-0.32.tar.gz + cd /tmp/Devel-Cover-Report-Coveralls && tar zxvf Devel-Cover-Report-Coveralls-0.32.tar.gz + cd /tmp/Devel-Cover-Report-Coveralls && DEB_BUILD_OPTIONS=nocheck dh-make-perl make --build Devel-Cover-Report-Coveralls-0.32 + - name: Devel-Cover-Report-Coveralls install the package - run: cd /tmp && sudo dpkg -i libdevel-cover-report-coveralls-perl*.deb + run: cd /tmp/Devel-Cover-Report-Coveralls && sudo dpkg -i libdevel-cover-report-coveralls-perl*.deb - name: Devel-Cover-Report-Coveralls install any needed deps run: sudo apt-get install -yf - + - name: Setup the mock hostname run: echo "127.0.0.1 testing.acme.com" | sudo tee -a /etc/hosts