Skip to content

Bump shogo82148/actions-setup-perl from 1.20.1 to 1.40.0 #221

Bump shogo82148/actions-setup-perl from 1.20.1 to 1.40.0

Bump shogo82148/actions-setup-perl from 1.20.1 to 1.40.0 #221

Workflow file for this run

name: Fhem UnitTest
on: [push, pull_request]
jobs:
build:
runs-on: ubuntu-latest
strategy:
matrix:
os: ['ubuntu-latest']
perl: [ '5.22', '5.24', '5.26','5.28' ]
name: Perl ${{ matrix.perl }} on ${{ matrix.os }}
steps:
- uses: actions/checkout@v3
with:
fetch-depth: 0
- uses: shogo82148/actions-setup-perl@v1.40.0
with:
perl-version: ${{ matrix.perl }}
- run: cpanm --notest --installdeps .
- name: install fhem via deb package
run: |
wget -qO - http://debian.fhem.de/archive.key | sudo apt-key add -
echo "deb http://debian.fhem.de/nightly/ /" | sudo tee -a /etc/apt/sources.list
sudo apt-get update -qq
sudo apt-get install fhem -y
sudo chown -R --reference=makefile /opt/fhem
sudo systemctl stop fhem
# - name: Setup tmate session
# uses: mxschmitt/action-tmate@v1
- name: run make test
id: classic_make_test
run: |
timeout 40 bash -c 'while /usr/bin/pgrep perl >> /dev/null; do sleep 1; echo .; done;'
make test PERL_OPTS="-MDevel::Cover" 2>make_error.txt && sudo pkill "^perl"
echo "::set-output name=exitcode::$(echo $?)"
cat make_error.txt
timeout 40 bash -c 'while /usr/bin/pgrep perl >> /dev/null; do sleep 1; echo .; done;' || sudo pkill "^perl"
sleep 3
cp -R /opt/fhem/cover_db ./
# grep -oP "^make:.*\[(.*)\].*Error" make_error.txt | awk -F'[][]' '{print $2}'
shell: bash {0}
# - name: show logs
# run: |
# cat /opt/fhem/log/*
- name: Create clover report
# run: cover -report codecov
run: cover -report clover
- uses: codecov/codecov-action@v3.1.1
with:
token: ${{ secrets.CODECOV_TOKEN }}
file: ./cover_db/clover.xml
flags: unittests
name: code coverage
- name: Fail if there was an error during tests
run: exit 1
if: ${{ steps.classic_make_test.outputs.exitcode != 0 }}