-
Notifications
You must be signed in to change notification settings - Fork 1
222 lines (206 loc) · 6.91 KB
/
test.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
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
198
199
200
201
202
203
204
205
206
207
208
209
210
211
212
213
214
215
216
217
218
219
220
221
222
---
name: Testing and linting
on:
push:
branches:
- main
- develop
pull_request:
workflow_dispatch:
schedule:
- cron: '40 8 * * 6'
env:
TYPO3_EXTENSION_KEY: html5mediakit
MAIN_PHP_VERSION: 8.3
CI: true
jobs:
"composer-validate":
name: "Composer validate"
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v4
- uses: ./.github/workflows/composer
with:
php_version: "${{ env.MAIN_PHP_VERSION }}"
- run: composer validate
"composer-normalize":
name: "Composer normalize"
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v4
- uses: ./.github/workflows/composer
with:
php_version: "${{ env.MAIN_PHP_VERSION }}"
- run: composer normalize --dry-run --diff
"check-codestyle-codesniffer":
name: "PHP_CodeSniffer check"
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v4
- uses: ./.github/workflows/composer
with:
php_version: "${{ env.MAIN_PHP_VERSION }}"
- uses: shivammathur/setup-php@v2
with:
php-version: "${{ env.MAIN_PHP_VERSION }}"
- run: |
bash bin/t3_check_codestyle.sh PerCodeStyleT3Ext
"check-codestyle-php-cs-fixer":
name: "PHP CS Fixer check"
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v4
- uses: ./.github/workflows/composer
with:
php_version: "${{ env.MAIN_PHP_VERSION }}"
- run: |
bash bin/t3_run_tests.sh -s cgl -n -p ${{ env.MAIN_PHP_VERSION }}
"php-unit-tests":
name: "PHP Unit tests"
strategy:
matrix:
php_version: ["8.2", "8.3"]
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v4
- uses: ./.github/workflows/composer
with:
php_version: ${{ matrix.php_version }}
- run: |
bash bin/t3_run_tests.sh -s unit -p ${{ matrix.php_version }}
"php-functional-tests-sqlite":
name: "Functional tests on SQLite"
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v4
- uses: ./.github/workflows/composer
with:
php_version: "${{ env.MAIN_PHP_VERSION }}"
- run: |
bash bin/t3_run_tests.sh -s functional -d sqlite -p ${{ env.MAIN_PHP_VERSION }}
"php-functional-tests-mariadb-main":
name: "Functional tests on MariaDB"
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v4
- uses: ./.github/workflows/composer
with:
php_version: ${{ env.MAIN_PHP_VERSION }}
- run: |
bash bin/t3_run_tests.sh -s functional -d mariadb -p ${{ env.MAIN_PHP_VERSION }}
"php-acceptance-tests-mariadb":
name: "Acceptance tests on MariaDB"
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v4
- uses: ./.github/workflows/composer
with:
php_version: ${{ env.MAIN_PHP_VERSION }}
- uses: shivammathur/setup-php@v2
with:
php-version: "${{ env.MAIN_PHP_VERSION }}"
extensions: intl zip
- run: |
rm -f .Build/Web/typo3/sysext/* .Build/Web/typo3conf/ext/*
composer run post-autoload-dump
bash bin/t3_run_tests.sh -s acceptance -d mariadb -p ${{ env.MAIN_PHP_VERSION }} -b docker
"php-lint":
name: "PHP linting"
strategy:
matrix:
php_version: ["8.2", "8.3"]
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v4
- uses: ./.github/workflows/composer
with:
php_version: ${{ matrix.php_version }}
- run: |
bash bin/t3_run_tests.sh -s lintPhp -p ${{ matrix.php_version }}
"phpstan":
name: "PHPStan"
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v4
- uses: ./.github/workflows/composer
with:
php_version: "${{ env.MAIN_PHP_VERSION }}"
- uses: shivammathur/setup-php@v2
with:
php-version: "${{ env.MAIN_PHP_VERSION }}"
extensions: intl zip
- run: |
php -dxdebug.mode=off bin/codecept build -c Tests/codeception.yml
php -dxdebug.mode=off bin/phpstan analyse -c Build/phpstan/phpstan.ci.neon --no-progress --no-interaction --memory-limit 4G --debug
"coverage-phpunit":
name: "Test coverage by Unit Tests"
runs-on: ubuntu-latest
if: github.ref == 'refs/heads/develop'
steps:
- uses: actions/checkout@v4
- uses: ./.github/workflows/composer
with:
php_version: ${{ env.MAIN_PHP_VERSION }}
- run: |
bash bin/t3_run_tests.sh -s unit -p ${{ env.MAIN_PHP_VERSION }} -X coverage -- --coverage-clover Logs/clover-unit.xml --coverage-filter ../Classes
- uses: actions/upload-artifact@v3
with:
name: coverage-phpunit
path: Logs/clover-unit.xml
retention-days: 1
"coverage-functional":
name: "Test coverage by Functional Tests"
runs-on: ubuntu-latest
if: github.ref == 'refs/heads/develop'
steps:
- uses: actions/checkout@v4
- uses: ./.github/workflows/composer
with:
php_version: ${{ env.MAIN_PHP_VERSION }}
- run: |
bash bin/t3_run_tests.sh -s functional -d mariadb -p ${{ env.MAIN_PHP_VERSION }} -X coverage -- --coverage-clover Logs/clover-functional.xml --coverage-filter ../Classes
- uses: actions/upload-artifact@v3
with:
name: coverage-functional
path: Logs/clover-functional.xml
retention-days: 1
"coverage-upload":
name: Upload coverage report to Code Climage
needs:
- coverage-phpunit
- coverage-functional
runs-on: ubuntu-latest
if: github.ref == 'refs/heads/develop'
env:
CC_TEST_REPORTER_ID: ${{ secrets.CC_TEST_REPORTER_ID }}
steps:
- uses: actions/checkout@v4
- uses: actions/download-artifact@v3
with:
name: coverage-phpunit
- uses: actions/download-artifact@v3
with:
name: coverage-functional
- run: curl -L https://codeclimate.com/downloads/test-reporter/test-reporter-latest-linux-amd64 > ./cc-test-reporter
- run: chmod +x ./cc-test-reporter
- run: ./cc-test-reporter before-build
- run: |
./cc-test-reporter format-coverage -t clover -o clover-unit.json clover-unit.xml
- run: |
./cc-test-reporter format-coverage -t clover -o clover-functional.json clover-functional.xml
- run: |
./cc-test-reporter sum-coverage --parts=2 --output=clover-sum.json clover-unit.json clover-functional.json
- run: |
./cc-test-reporter upload-coverage --input=clover-sum.json
"typo3-scan":
name: "Scan for deprecated and breaking code using typo3scan"
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v4
- uses: ./.github/workflows/composer
with:
php_version: "${{ env.MAIN_PHP_VERSION }}"
- uses: shivammathur/setup-php@v2
with:
php-version: "${{ env.MAIN_PHP_VERSION }}"
- run: php bin/typo3scan scan .