-
Notifications
You must be signed in to change notification settings - Fork 1
69 lines (61 loc) · 2 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
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 }}