-
Notifications
You must be signed in to change notification settings - Fork 33
83 lines (72 loc) · 2.73 KB
/
prove.yml
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
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/actions-setup-perl@v1.31.4
with:
perl-version: ${{ matrix.perl }}
install-modules-with: cpanm
install-modules-args: --no-interactive -v --installdeps
- name: Install FHEM via debian nightly
uses: fhem/setup-fhem@v1.0.1
- 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/codecov-action@v5.1.2
with:
token: ${{ secrets.CODECOV_TOKEN }}
files: 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/codecov-action@v5.1.2
with:
token: ${{ secrets.CODECOV_TOKEN }}
files: 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 }}" \