Skip to content

Merge pull request #1267 from RFD-FHEM/dependabot/github_actions/shog… #3

Merge pull request #1267 from RFD-FHEM/dependabot/github_actions/shog…

Merge pull request #1267 from RFD-FHEM/dependabot/github_actions/shog… #3

Workflow file for this run

name: Perl Modules&FHEM Unittests
on:
push:
branches:
- '*'
- '!push-action/**/**'
pull_request:
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]
- name: change ownership of /opt/fhem
run: |
sudo chown -R --reference=cpanfile /opt/fhem
- name: run prove on perl modules (testscripts)
run: |
echo "::remove-matcher owner=perl::"
prove -j3 --exec 'perl -MDevel::Cover=-silent,1 -I FHEM ' -I FHEM -r -v t/SD_Protoco* > >(tee -a ${GITHUB_WORKSPACE}/testOutput.stdout) 2> >(tee -a ${GITHUB_WORKSPACE}/testOutput.stderr >&2)
- name: run prove fhem testsuite ${{ matrix.perl }}
run: |
cp -R ${GITHUB_WORKSPACE}/FHEM/* ${FHEM_DIR}/FHEM/
cp -R ${GITHUB_WORKSPACE}/lib/* ${FHEM_DIR}/lib/
prove -j3 --exec 'perl -MDevel::Cover=-silent,1 fhem.pl -t' -I FHEM -v -r ${GITHUB_WORKSPACE}/t/FHEM/ > >(tee -a ${GITHUB_WORKSPACE}/testOutput.stdout) 2> >(tee -a ${GITHUB_WORKSPACE}/testOutput.stderr >&2)
working-directory: /opt/fhem/
env:
FHEM_DIR: /opt/fhem
- name: Create clover report for perl Modules
run: cover -report clover
- uses: codecov/[email protected]
with:
token: ${{ secrets.CODECOV_TOKEN }}
file: clover.xml
directory: ./cover_db
flags: unittests,perl,modules
name: perl modules (testscripts) ${{ matrix.perl }}
- name: Create clover report for fhem tests
working-directory: /opt/fhem/
run: cover -report clover
- uses: codecov/[email protected]
with:
token: ${{ secrets.CODECOV_TOKEN }}
file: clover.xml
directory: /opt/fhem/cover_db
flags: unittests,fhem,modules
name: fhem (testscripts) ${{ matrix.perl }}
- uses: reviewdog/action-setup@v1
if: always() && github.event_name == 'pull_request'
with:
reviewdog_version: latest
- name: Run reviewdog
if: always() && github.event_name == 'pull_request' && !cancelled()
env:
REVIEWDOG_GITHUB_API_TOKEN: ${{ secrets.GITHUB_TOKEN }}
run: |
reviewdog \
-name=perl-${{ matrix.perl }} \
-reporter="github-pr-check" \
-filter-mode="file" \
--diff="git diff ${{ github.base_ref }}" \