Skip to content

Perl Modules&FHEM Unittests #582

Perl Modules&FHEM Unittests

Perl Modules&FHEM Unittests #582

Workflow file for this run

name: Perl Modules&FHEM Unittests
on:
pull_request:
types: [opened, synchronize]
push:
branches:
paths:
- 'FHEM/**'
- 't/**'
- 'cpanfile'
- '.github/workflows/prove.yml'
schedule:
- cron: '47 16 * * 1,5'
jobs:
libModTests:
runs-on: ubuntu-latest
strategy:
matrix:
os: ['ubuntu-latest']
perl: [ '5.24', '5.28','5.32' ]
name: Perl ${{ matrix.perl }} on ${{ matrix.os }}
steps:
- uses: actions/checkout@v4
- uses: shogo82148/[email protected]
with:
perl-version: ${{ matrix.perl }}
install-modules-with: cpanm
install-modules-args: --no-interactive -v --installdeps
- name: Install FHEM via debian nightly
uses: fhem/[email protected]
with:
runservice : true
- name: Install Test2 RDMSG Tool
run: |
wget -O fhemcl.sh https://raw.githubusercontent.com/heinz-otto/fhemcl/master/fhemcl.sh
chmod +x ./fhemcl.sh && echo -e "update force https://raw.githubusercontent.com/fhem/Test2-FHEM/main/controls_Test2-FHEM.txt" | ./fhemcl.sh http://localhost:8083 && sleep 5
shell: bash
- name: Stop Service
run : sudo systemctl stop fhem
shell: bash
- name: change ownership of /opt/fhem
run: |
sudo chown -R --reference=cpanfile /opt/fhem
shell: bash
- name: run prove fhem testsuite ${{ matrix.perl }}
run: |
cp -R ${GITHUB_WORKSPACE}/FHEM/* ${FHEM_DIR}/FHEM/
prove --exec 'perl -MDevel::Cover=-silent,1 fhem.pl -t' -I FHEM -r -vv -r ${GITHUB_WORKSPACE}/t/FHEM/
working-directory: /opt/fhem/
env:
FHEM_DIR: /opt/fhem
- name: Create clover report
working-directory: /opt/fhem/
run: cover -report clover
- uses: codecov/[email protected]
with:
token: ${{ secrets.CODECOV_TOKEN }}
directory: /opt/fhem/cover_db
files: ./clover.xml
flags: unittests,fhem,modules
name: fhem (testscripts) ${{ matrix.perl }}