Verzeichnisstruktur phpBB-3.3.15
- Veröffentlicht
- 28.08.2024
So funktioniert es
|
Auf das letzte Element klicken. Dies geht jeweils ein Schritt zurück |
Auf das Icon klicken, dies öffnet das Verzeichnis. Nochmal klicken schließt das Verzeichnis. |
|
(Beispiel Datei-Icons)
|
Auf das Icon klicken um den Quellcode anzuzeigen |
tests.yml
001 name: Tests
002
003 env:
004 EXTNAME: phpbb/viglink # Your extension vendor/package name
005 SNIFF: 1 # Run code sniffer on your code? 1 or 0
006 IMAGE_ICC: 1 # Run icc profile sniffer on your images? 1 or 0
007 EPV: 1 # Run EPV (Extension Pre Validator) on your code? 1 or 0
008 EXECUTABLE_FILES: 1 # Run check for executable files? 1 or 0
009 PHPBB_BRANCH: 3.3.x # The phpBB branch to run tests on
010
011 on:
012 push:
013 branches: # Run tests when commits are pushed to these branches in your repo
014 - master
015 - develop
016 pull_request: # Run tests when pull requests are made on these branches in your repo
017 branches:
018 - master
019 - develop
020
021 jobs:
022 # START Basic Checks Job (EPV, code sniffer, images check, etc.)
023 basic-checks:
024 runs-on: ubuntu-22.04
025 strategy:
026 matrix:
027 include:
028 - php: '7.2'
029 db: "none"
030 NOTESTS: 1
031
032 name: PHP ${{ matrix.php }} - ${{ matrix.db }}
033
034 steps:
035 - name: Checkout phpBB
036 uses: actions/checkout@v4
037 with:
038 repository: phpbb/phpbb
039 ref: ${{ env.PHPBB_BRANCH }}
040 path: phpBB3
041
042 - name: Checkout extension
043 uses: actions/checkout@v4
044 with:
045 path: phpBB3/phpBB/ext/${{ env.EXTNAME }}
046
047 - name: Setup PHP
048 uses: shivammathur/setup-php@v2
049 with:
050 php-version: ${{ matrix.php }}
051 extensions: dom, curl, libxml, mbstring, zip, pcntl, pdo, mysqli, sqlite, pdo_sqlite, intl, gd, exif, iconv, sqlsrv, pdo_sqlsrv, ldap
052 coverage: none
053
054 - name: Setup environment for phpBB
055 env:
056 DB: ${{ matrix.db }}
057 PHP_VERSION: ${{ matrix.php }}
058 NOTESTS: '1'
059 run: .github/setup-phpbb.sh $DB $PHP_VERSION $NOTESTS
060 working-directory: ./phpBB3
061
062 - name: Setup EPV
063 if: ${{ env.EPV != 0 }}
064 run: composer require phpbb/epv:dev-master --dev --no-interaction --ignore-platform-reqs
065 working-directory: ./phpBB3/phpBB
066
067 - name: Run code sniffer
068 if: ${{ env.SNIFF != 0 }}
069 env:
070 NOTESTS: '1'
071 run: .github/ext-sniff.sh $EXTNAME $NOTESTS
072 working-directory: ./phpBB3
073
074 - name: Check image ICC profiles
075 if: ${{ env.IMAGE_ICC != 0 }}
076 run: .github/check-image-icc-profiles.sh
077 working-directory: ./phpBB3
078
079 - name: Check executable files
080 if: ${{ env.EXECUTABLE_FILES != 0 }}
081 run: .github/ext-check-executable-files.sh ./ $EXTNAME
082 working-directory: ./phpBB3
083
084 - name: Run EPV
085 if: ${{ env.EPV != 0 }}
086 run: phpBB/vendor/bin/EPV.php run --dir="phpBB/ext/$EXTNAME/"
087 working-directory: ./phpBB3
088 # END Basic Checks Job
089
090 # START MySQL and MariaDB Job
091 mysql-tests:
092 runs-on: ubuntu-22.04
093 strategy:
094 matrix:
095 include:
096 - php: '7.2'
097 db: "mariadb:10.1"
098 - php: '7.2'
099 db: "mariadb:10.2"
100 - php: '7.2'
101 db: "mariadb:10.3"
102 - php: '7.2'
103 db: "mariadb:10.4"
104 - php: '7.2'
105 db: "mariadb:10.5"
106 - php: '7.2'
107 db: "mysql:5.6"
108 db_alias: "MyISAM Tests"
109 MYISAM: 1
110 - php: '7.2'
111 db: "mysql:5.6"
112 - php: '7.2'
113 db: "mysql:5.7"
114 - php: '7.3'
115 db: "mysql:5.7"
116 - php: '7.4'
117 db: "mysql:5.7"
118 - php: '7.4'
119 db: "mysql:8.0"
120 - php: '8.0'
121 db: "mysql:5.7"
122 - php: '8.1'
123 db: "mysql:5.7"
124 - php: '8.2'
125 db: "mysql:5.7"
126 - php: '8.3'
127 db: "mysql:5.7"
128 - php: '8.4'
129 db: "mysql:5.7"
130
131 name: PHP ${{ matrix.php }} - ${{ matrix.db_alias != '' && matrix.db_alias || matrix.db }}
132
133 services:
134 mysql:
135 image: ${{ matrix.db }}
136 env:
137 MYSQL_ALLOW_EMPTY_PASSWORD: yes
138 MYSQL_DATABASE: phpbb_tests
139 ports:
140 - 3306:3306
141 options: >-
142 --health-cmd="mysqladmin ping"
143 --health-interval=10s
144 --health-timeout=5s
145 --health-retries=3
146
147 redis:
148 image: redis
149 options: >-
150 --health-cmd "redis-cli ping"
151 --health-interval 10s
152 --health-timeout 5s
153 --health-retries 5
154 ports:
155 - 6379:6379
156
157 steps:
158 - name: Checkout phpBB
159 uses: actions/checkout@v4
160 with:
161 repository: phpbb/phpbb
162 ref: ${{ env.PHPBB_BRANCH }}
163 path: phpBB3
164
165 - name: Checkout extension
166 uses: actions/checkout@v4
167 with:
168 path: phpBB3/phpBB/ext/${{ env.EXTNAME }}
169
170 - id: database-type
171 env:
172 MATRIX_DB: ${{ matrix.db }}
173 run: |
174 db=$(echo "${MATRIX_DB%%:*}")
175 echo "db=$db" >> $GITHUB_OUTPUT
176
177 - name: Setup PHP
178 uses: shivammathur/setup-php@v2
179 with:
180 php-version: ${{ matrix.php }}
181 extensions: dom, curl, libxml, mbstring, zip, pcntl, pdo, mysqli, sqlite, pdo_sqlite, intl, gd, exif, iconv, sqlsrv, pdo_sqlsrv, ldap
182 coverage: none
183
184 - name: Setup environment for phpBB
185 env:
186 DB: ${{steps.database-type.outputs.db}}
187 PHP_VERSION: ${{ matrix.php }}
188 NOTESTS: '0'
189 run: .github/setup-phpbb.sh $DB $PHP_VERSION ${NOTESTS:-0}
190 working-directory: ./phpBB3
191
192 - name: Setup database
193 env:
194 DB: ${{steps.database-type.outputs.db}}
195 MYISAM: ${{ matrix.MYISAM != 1 && '0' || '1' }}
196 run: .github/setup-database.sh $DB $MYISAM
197 working-directory: ./phpBB3
198
199 - name: Setup PHPUnit files
200 run: mkdir -p phpBB/ext/$EXTNAME/.github && cp .github/phpunit* $_
201 working-directory: ./phpBB3
202
203 - name: Run unit tests
204 env:
205 DB: ${{steps.database-type.outputs.db}}
206 run: phpBB/vendor/bin/phpunit --configuration phpBB/ext/$EXTNAME/.github/phpunit-$DB-github.xml --bootstrap ./tests/bootstrap.php
207 working-directory: ./phpBB3
208 # END MySQL and MariaDB Job
209
210 # START PostgreSQL Job
211 postgres-tests:
212 runs-on: ubuntu-22.04
213 strategy:
214 matrix:
215 include:
216 - php: '7.2'
217 db: "postgres:9.5"
218 - php: '7.2'
219 db: "postgres:9.6"
220 - php: '7.2'
221 db: "postgres:10"
222 - php: '7.2'
223 db: "postgres:11"
224 - php: '7.2'
225 db: "postgres:12"
226 - php: '7.2'
227 db: "postgres:13"
228 - php: '7.3'
229 db: "postgres:13"
230 - php: '7.4'
231 db: "postgres:13"
232 - php: '8.0'
233 db: "postgres:12"
234 - php: '8.0'
235 db: "postgres:13"
236 - php: '8.1'
237 db: "postgres:14"
238 - php: '8.2'
239 db: "postgres:14"
240 - php: '8.3'
241 db: "postgres:14"
242 - php: '8.4'
243 db: "postgres:14"
244
245 name: PHP ${{ matrix.php }} - ${{ matrix.db }}
246
247 services:
248 postgres:
249 image: ${{ matrix.db != 'postgres:9.5' && matrix.db != 'postgres:9.6' && matrix.db != 'postgres:10' && matrix.db != 'postgres:11' && matrix.db != 'postgres:12' && matrix.db != 'postgres:13' && 'postgres:10' || matrix.db }}
250 env:
251 POSTGRES_HOST: localhost
252 POSTGRES_USER: postgres
253 POSTGRES_PASSWORD: postgres
254 ports:
255 - 5432:5432
256 options: >-
257 -v /var/run/postgresql:/var/run/postgresql
258 --health-cmd pg_isready
259 --health-interval 10s
260 --health-timeout 5s
261 --health-retries 5
262
263 redis:
264 image: redis
265 options: >-
266 --health-cmd "redis-cli ping"
267 --health-interval 10s
268 --health-timeout 5s
269 --health-retries 5
270 ports:
271 - 6379:6379
272
273 steps:
274 - name: Checkout phpBB
275 uses: actions/checkout@v4
276 with:
277 repository: phpbb/phpbb
278 ref: ${{ env.PHPBB_BRANCH }}
279 path: phpBB3
280
281 - name: Checkout extension
282 uses: actions/checkout@v4
283 with:
284 path: phpBB3/phpBB/ext/${{ env.EXTNAME }}
285
286 - id: database-type
287 env:
288 MATRIX_DB: ${{ matrix.db }}
289 run: |
290 db=$(echo "${MATRIX_DB%%:*}")
291 echo "db=$db" >> $GITHUB_OUTPUT
292
293 - name: Setup PHP
294 uses: shivammathur/setup-php@v2
295 with:
296 php-version: ${{ matrix.php }}
297 extensions: dom, curl, libxml, mbstring, zip, pcntl, pdo, mysqli, sqlite, pdo_sqlite, intl, gd, exif, iconv, sqlsrv, pdo_sqlsrv, ldap
298 coverage: none
299
300 - name: Setup environment for phpBB
301 env:
302 DB: ${{steps.database-type.outputs.db}}
303 PHP_VERSION: ${{ matrix.php }}
304 NOTESTS: '0'
305 run: .github/setup-phpbb.sh $DB $PHP_VERSION ${NOTESTS:-0}
306 working-directory: ./phpBB3
307
308 - name: Setup database
309 env:
310 DB: ${{steps.database-type.outputs.db}}
311 MYISAM: '0'
312 run: .github/setup-database.sh $DB $MYISAM
313 working-directory: ./phpBB3
314
315 - name: Setup PHPUnit files
316 run: mkdir -p phpBB/ext/$EXTNAME/.github && cp .github/phpunit* $_
317 working-directory: ./phpBB3
318
319 - name: Run unit tests
320 env:
321 DB: ${{steps.database-type.outputs.db}}
322 run: phpBB/vendor/bin/phpunit --configuration phpBB/ext/$EXTNAME/.github/phpunit-$DB-github.xml --bootstrap ./tests/bootstrap.php
323 working-directory: ./phpBB3
324 # END PostgreSQL Job
325
326 # START Other Tests Job (SQLite 3 and mssql)
327 other-tests:
328 runs-on: ubuntu-22.04
329 strategy:
330 matrix:
331 include:
332 - php: '7.2'
333 db: "sqlite3"
334 - php: '7.2'
335 db: "mcr.microsoft.com/mssql/server:2017-latest"
336 db_alias: 'MSSQL 2017'
337 - php: '7.2'
338 db: "mcr.microsoft.com/mssql/server:2019-latest"
339 db_alias: 'MSSQL 2019'
340
341 name: PHP ${{ matrix.php }} - ${{ matrix.db_alias != '' && matrix.db_alias || matrix.db }}
342
343 services:
344 mssql:
345 image: ${{ matrix.db != 'mcr.microsoft.com/mssql/server:2017-latest' && matrix.db != 'mcr.microsoft.com/mssql/server:2019-latest' && 'mcr.microsoft.com/mssql/server:2017-latest' || matrix.db }}
346 env:
347 SA_PASSWORD: "Pssw0rd_12"
348 ACCEPT_EULA: "y"
349 ports:
350 - 1433:1433
351 options: >-
352 --health-cmd="/opt/mssql-tools/bin/sqlcmd -S localhost -U sa -P 'Pssw0rd_12' -Q \"Use [master]; CREATE DATABASE [phpbb_tests] COLLATE Latin1_General_CI_AS\" || exit 1"
353 --health-interval 10s
354 --health-timeout 5s
355 --health-retries 5
356 --health-start-period 10s
357
358 redis:
359 image: redis
360 options: >-
361 --health-cmd "redis-cli ping"
362 --health-interval 10s
363 --health-timeout 5s
364 --health-retries 5
365 ports:
366 - 6379:6379
367
368 steps:
369 - name: Checkout phpBB
370 uses: actions/checkout@v4
371 with:
372 repository: phpbb/phpbb
373 ref: ${{ env.PHPBB_BRANCH }}
374 path: phpBB3
375
376 - name: Checkout extension
377 uses: actions/checkout@v4
378 with:
379 path: phpBB3/phpBB/ext/${{ env.EXTNAME }}
380
381 - id: database-type
382 env:
383 MATRIX_DB: ${{ matrix.db }}
384 run: |
385 if [ $MATRIX_DB == 'mcr.microsoft.com/mssql/server:2017-latest' ] || [ $MATRIX_DB == 'mcr.microsoft.com/mssql/server:2019-latest' ]
386 then
387 db='mssql'
388 else
389 db=$(echo "${MATRIX_DB%%:*}")
390 fi
391 echo "db=$db" >> $GITHUB_OUTPUT
392
393 - name: Setup PHP
394 uses: shivammathur/setup-php@v2
395 with:
396 php-version: ${{ matrix.php }}
397 extensions: dom, curl, libxml, mbstring, zip, pcntl, pdo, mysqli, sqlite, pdo_sqlite, intl, gd, exif, iconv, sqlsrv, pdo_sqlsrv, ldap
398 coverage: none
399
400 - name: Setup environment for phpBB
401 env:
402 DB: ${{steps.database-type.outputs.db}}
403 PHP_VERSION: ${{ matrix.php }}
404 NOTESTS: '0'
405 run: .github/setup-phpbb.sh $DB $PHP_VERSION ${NOTESTS:-0}
406 working-directory: ./phpBB3
407
408 - name: Setup database
409 env:
410 DB: ${{steps.database-type.outputs.db}}
411 MYISAM: '0'
412 run: .github/setup-database.sh $DB $MYISAM
413 working-directory: ./phpBB3
414
415 - name: Setup PHPUnit files
416 run: mkdir -p phpBB/ext/$EXTNAME/.github && cp .github/phpunit* $_
417 working-directory: ./phpBB3
418
419 - name: Run unit tests
420 env:
421 DB: ${{steps.database-type.outputs.db}}
422 run: phpBB/vendor/bin/phpunit --configuration phpBB/ext/$EXTNAME/.github/phpunit-$DB-github.xml --bootstrap ./tests/bootstrap.php
423 working-directory: ./phpBB3
424 # END Other Tests Job
425