1
1
name : Test TYPO3 Extension
2
2
3
- on : [ push, pull_request ]
3
+ # Make sure only one build is running per branch at a time
4
+ concurrency :
5
+ group : ${{ github.workflow }}-${{ github.ref }}
6
+ cancel-in-progress : true
7
+
8
+ on :
9
+ push :
10
+ branches :
11
+ - main
12
+ pull_request :
13
+ branches :
14
+ - main
4
15
5
16
permissions :
6
17
contents : read
@@ -9,13 +20,12 @@ permissions:
9
20
jobs :
10
21
test :
11
22
runs-on : ubuntu-latest
12
- name : TYPO3 ${{ matrix.typo3}} tests on PHP ${{ matrix.php }}
23
+ name : TYPO3 v13.4 tests on PHP ${{ matrix.php }}
13
24
14
25
strategy :
15
26
fail-fast : false
16
27
matrix :
17
- php : [ 8.1, 8.2 ]
18
- typo3 : [ 12.4 ]
28
+ php : [8.3, 8.4]
19
29
20
30
steps :
21
31
- name : ' Checkout code'
@@ -39,46 +49,45 @@ jobs:
39
49
uses : actions/cache@v4
40
50
with :
41
51
path : ${{ steps.composer-cache.outputs.dir }}
42
- key : composer-php${{ matrix.php }}-typo3${{ matrix.typo3 }}
52
+ key : composer-php${{ matrix.php }}
43
53
44
54
- name : ' Validate composer.json and composer.lock'
45
55
shell : bash
46
56
run : composer validate --strict
47
57
48
- - name : ' Install TYPO3 core '
58
+ - name : ' Install Composer Dependencies '
49
59
shell : bash
50
- run : composer require typo3/cms-core="^${{ matrix.typo3 }}" -W
60
+ run : composer install --no-interaction
51
61
52
62
- name : ' PHPUnit unit tests'
53
63
shell : bash
54
- run : composer test- unit
64
+ run : composer test: unit
55
65
56
66
- name : ' PHPUnit functional tests'
57
67
shell : bash
58
- run : composer test- functional
68
+ run : composer test: functional
59
69
60
- # merge result files from unit tests and functional tests
61
70
- name : ' Merge Coverage Reports'
62
71
shell : bash
63
- run : .Build/bin/phpcov merge --php .Build/logs/coverage.php -- html .Build/logs /coverage/merged --cobertura .Build/logs/cobertura .xml .Build/logs /coverage/
72
+ run : .Build/bin/phpcov merge --html .Build/artifacts /coverage/merged --clover .Build/artifacts/coverage/clover .xml .Build/artifacts /coverage/
64
73
65
- # finally use the cobertura report and generate coverage summary
66
- - name : ' Code Coverage Summary Report'
67
-
74
+ - name : ' Generate code coverage summary report'
75
+ uses :
saschanowak/[email protected]
68
76
with :
69
- filename : .Build/logs/cobertura .xml
70
- badge : true
71
- # there are not enough tests yet
72
- fail_below_min : false
73
- format : markdown
74
- hide_branch_rate : true
75
- hide_complexity : false
76
- indicators : true
77
- output : both
78
- thresholds : ' 60 80 '
79
-
80
- - name : Add Coverage PR Comment
77
+ filename : .Build/artifacts/coverage/clover .xml
78
+
79
+ - name : ' Add code coverage summary as action run comment '
80
+ run : |
81
+ cat code-coverage-summary.md >> $GITHUB_STEP_SUMMARY
82
+ cat code-coverage-details.md >> $GITHUB_STEP_SUMMARY
83
+
84
+ - name : ' Add title to code coverage summary '
85
+ shell : bash
86
+ run : sed -i '1 i\## TYPO3 v13.4 tests on PHP ${{ matrix.php }}' code-coverage-summary.md
87
+
88
+ - name : ' Add code coverage summary as pr comment '
81
89
uses : marocchino/sticky-pull-request-comment@v2
82
90
with :
91
+ header : coverage-${{ matrix.php }}
83
92
recreate : true
84
- path : code-coverage-results .md
93
+ path : code-coverage-summary .md
0 commit comments