Merge pull request 'Ci/php matrix' (#68) from ci/php-matrix into main
Reviewed-on: #68
This commit was merged in pull request #68.
This commit is contained in:
commit
4c33d9fa15
4 files changed
+27
-6
No files matched your search
+21
-2
@@ -32,15 +32,21 @@ on:
|
|||||||
branches: ['**']
|
branches: ['**']
|
||||||
|
|
||||||
jobs:
|
jobs:
|
||||||
test:
|
# Matrix over the supported PHP versions.
|
||||||
|
phpunit:
|
||||||
|
name: PHP ${{ matrix.php }}
|
||||||
runs-on: ubuntu-latest
|
runs-on: ubuntu-latest
|
||||||
|
strategy:
|
||||||
|
fail-fast: false
|
||||||
|
matrix:
|
||||||
|
php: ['8.4', '8.5']
|
||||||
steps:
|
steps:
|
||||||
- uses: actions/checkout@v4
|
- uses: actions/checkout@v4
|
||||||
|
|
||||||
- name: Setup PHP
|
- name: Setup PHP
|
||||||
uses: shivammathur/setup-php@v2
|
uses: shivammathur/setup-php@v2
|
||||||
with:
|
with:
|
||||||
php-version: '8.5'
|
php-version: ${{ matrix.php }}
|
||||||
extensions: mbstring, intl, pdo_sqlite, sqlite3
|
extensions: mbstring, intl, pdo_sqlite, sqlite3
|
||||||
coverage: none
|
coverage: none
|
||||||
|
|
||||||
@@ -53,6 +59,19 @@ jobs:
|
|||||||
- name: Coding standard
|
- name: Coding standard
|
||||||
run: vendor/bin/phpcs --warning-severity=0
|
run: vendor/bin/phpcs --warning-severity=0
|
||||||
|
|
||||||
|
# Stable check name required by the branch protection of main: green only if all PHP versions are green.
|
||||||
|
test:
|
||||||
|
needs: phpunit
|
||||||
|
if: always()
|
||||||
|
runs-on: ubuntu-latest
|
||||||
|
steps:
|
||||||
|
- name: All PHP versions passed
|
||||||
|
run: |
|
||||||
|
if [ "${{ needs.phpunit.result }}" != "success" ]; then
|
||||||
|
echo "Matrix result: ${{ needs.phpunit.result }}" >&2
|
||||||
|
exit 1
|
||||||
|
fi
|
||||||
|
|
||||||
deploy:
|
deploy:
|
||||||
needs: test
|
needs: test
|
||||||
# Deactivated until the repository variable DEPLOY_ENABLED is "true".
|
# Deactivated until the repository variable DEPLOY_ENABLED is "true".
|
||||||
|
|||||||
@@ -333,7 +333,9 @@ Kein WebSocket: Presenter (`/admin/{token}/state`) und Teilnehmende (`/p/{code}/
|
|||||||
|
|
||||||
Deploy erfolgt über Git (Remote: Gitea) mit `.gitea/workflows/ci.yml`:
|
Deploy erfolgt über Git (Remote: Gitea) mit `.gitea/workflows/ci.yml`:
|
||||||
|
|
||||||
- Job `test` (PHPUnit + phpcs) läuft bei jedem Push auf jeden Branch. `main` ist per Branch-Schutz
|
- Job `phpunit` (PHPUnit + phpcs) läuft bei jedem Push auf jeden Branch, als Matrix gegen PHP 8.4 und 8.5.
|
||||||
|
Der Sammel-Job `test` ist nur grün, wenn alle Matrix-Läufe grün sind, und bleibt der Check, den der Branch-Schutz
|
||||||
|
verlangt (so muss dort bei neuen PHP-Versionen nichts angepasst werden). `main` ist per Branch-Schutz
|
||||||
in Gitea gesperrt: kein direkter Push, Merge nur per PR und nur mit grünem Status-Check des Jobs `test`.
|
in Gitea gesperrt: kein direkter Push, Merge nur per PR und nur mit grünem Status-Check des Jobs `test`.
|
||||||
- Job `deploy` läuft nur bei Push auf `main`, nur bei grünen Tests und **nur wenn die Repo-Variable
|
- Job `deploy` läuft nur bei Push auf `main`, nur bei grünen Tests und **nur wenn die Repo-Variable
|
||||||
`DEPLOY_ENABLED=true` gesetzt ist** (standardmäßig deaktiviert). Er verbindet sich per SSH
|
`DEPLOY_ENABLED=true` gesetzt ist** (standardmäßig deaktiviert). Er verbindet sich per SSH
|
||||||
|
|||||||
+1
-1
@@ -5,7 +5,7 @@
|
|||||||
"type": "project",
|
"type": "project",
|
||||||
"homepage": "https://cakephp.org",
|
"homepage": "https://cakephp.org",
|
||||||
"require": {
|
"require": {
|
||||||
"php": ">=8.2",
|
"php": ">=8.4",
|
||||||
"cakephp/cakephp": "5.4.*",
|
"cakephp/cakephp": "5.4.*",
|
||||||
"cakephp/migrations": "^5.0",
|
"cakephp/migrations": "^5.0",
|
||||||
"cakephp/plugin-installer": "^2.0",
|
"cakephp/plugin-installer": "^2.0",
|
||||||
|
|||||||
Generated
+2
-2
@@ -4,7 +4,7 @@
|
|||||||
"Read more about it at https://getcomposer.org/doc/01-basic-usage.md#installing-dependencies",
|
"Read more about it at https://getcomposer.org/doc/01-basic-usage.md#installing-dependencies",
|
||||||
"This file is @generated automatically"
|
"This file is @generated automatically"
|
||||||
],
|
],
|
||||||
"content-hash": "ddccb2d95917b222589d74cc89a09235",
|
"content-hash": "d1039a47e3b46af459f914d1ea67c437",
|
||||||
"packages": [
|
"packages": [
|
||||||
{
|
{
|
||||||
"name": "cakephp/cakephp",
|
"name": "cakephp/cakephp",
|
||||||
@@ -6893,7 +6893,7 @@
|
|||||||
"prefer-stable": false,
|
"prefer-stable": false,
|
||||||
"prefer-lowest": false,
|
"prefer-lowest": false,
|
||||||
"platform": {
|
"platform": {
|
||||||
"php": ">=8.2"
|
"php": ">=8.4"
|
||||||
},
|
},
|
||||||
"platform-dev": {},
|
"platform-dev": {},
|
||||||
"plugin-api-version": "2.11.0"
|
"plugin-api-version": "2.11.0"
|
||||||
|
|||||||
Reference in new issue
Block a user