Skip to content

Commit f51e9fe

Browse files
committed
Fix CI: real DB matrix via db_dsn, coverage upload on PHP 8.2, mysql:8.0, updated actions, php-jwt advisory ignore, webauthn-lib dev dependency
1 parent 0c74fa9 commit f51e9fe

2 files changed

Lines changed: 22 additions & 16 deletions

File tree

‎.github/workflows/ci.yml‎

Lines changed: 15 additions & 15 deletions
Original file line numberDiff line numberDiff line change
@@ -18,15 +18,15 @@ jobs:
1818
prefer-lowest: ['']
1919

2020
steps:
21-
- name: Setup MySQL latest
21+
- name: Setup MySQL 8.0
2222
if: matrix.db-type == 'mysql'
23-
run: docker run --rm --name=mysqld -e MYSQL_ROOT_PASSWORD=root -e MYSQL_DATABASE=cakephp -p 3306:3306 -d mysql --default-authentication-plugin=mysql_native_password --disable-log-bin
23+
run: docker run --rm --name=mysqld -e MYSQL_ROOT_PASSWORD=root -e MYSQL_DATABASE=cakephp -p 3306:3306 -d mysql:8.0 --default-authentication-plugin=mysql_native_password --disable-log-bin
2424

2525
- name: Setup PostgreSQL latest
2626
if: matrix.db-type == 'pgsql'
2727
run: docker run --rm --name=postgres -e POSTGRES_PASSWORD=postgres -e POSTGRES_DB=cakephp -p 5432:5432 -d postgres
2828

29-
- uses: actions/checkout@v2
29+
- uses: actions/checkout@v4
3030

3131
- name: Setup PHP
3232
uses: shivammathur/setup-php@v2
@@ -38,14 +38,14 @@ jobs:
3838

3939
- name: Get composer cache directory
4040
id: composer-cache
41-
run: echo "::set-output name=dir::$(composer config cache-files-dir)"
41+
run: echo "dir=$(composer config cache-files-dir)" >> "$GITHUB_OUTPUT"
4242

4343
- name: Get date part for cache key
4444
id: key-date
45-
run: echo "::set-output name=date::$(date +'%Y-%m')"
45+
run: echo "date=$(date +'%Y-%m')" >> "$GITHUB_OUTPUT"
4646

4747
- name: Cache composer dependencies
48-
uses: actions/cache@v1
48+
uses: actions/cache@v4
4949
with:
5050
path: ${{ steps.composer-cache.outputs.dir }}
5151
key: ${{ runner.os }}-composer-${{ steps.key-date.outputs.date }}-${{ hashFiles('composer.json') }}-${{ matrix.prefer-lowest }}
@@ -64,25 +64,25 @@ jobs:
6464

6565
- name: Run PHPUnit
6666
run: |
67-
if [[ ${{ matrix.db-type }} == 'sqlite' ]]; then export DB_URL='sqlite:///:memory:'; fi
68-
if [[ ${{ matrix.db-type }} == 'mysql' ]]; then export DB_URL='mysql://root:root@127.0.0.1/cakephp?encoding=utf8'; fi
69-
if [[ ${{ matrix.db-type }} == 'pgsql' ]]; then export DB_URL='postgres://postgres:postgres@127.0.0.1/postgres'; fi
67+
if [[ ${{ matrix.db-type }} == 'sqlite' ]]; then export db_dsn='sqlite:///:memory:'; fi
68+
if [[ ${{ matrix.db-type }} == 'mysql' ]]; then export db_dsn='mysql://root:root@127.0.0.1/cakephp?encoding=utf8'; fi
69+
if [[ ${{ matrix.db-type }} == 'pgsql' ]]; then export db_dsn='postgres://postgres:postgres@127.0.0.1/cakephp'; fi
7070
if [[ ${{ matrix.php-version }} == '8.2' ]]; then
7171
export CODECOVERAGE=1 && vendor/bin/phpunit --coverage-clover=coverage.xml
7272
else
7373
vendor/bin/phpunit
7474
fi
7575
7676
- name: Submit code coverage
77-
if: matrix.php-version == '8.1'
78-
uses: codecov/codecov-action@v1
77+
if: matrix.php-version == '8.2'
78+
uses: codecov/codecov-action@v5
7979

8080
cs-stan:
8181
name: Coding Standard & Static Analysis
8282
runs-on: ubuntu-22.04
8383

8484
steps:
85-
- uses: actions/checkout@v2
85+
- uses: actions/checkout@v4
8686

8787
- name: Setup PHP
8888
uses: shivammathur/setup-php@v2
@@ -93,14 +93,14 @@ jobs:
9393

9494
- name: Get composer cache directory
9595
id: composer-cache
96-
run: echo "::set-output name=dir::$(composer config cache-files-dir)"
96+
run: echo "dir=$(composer config cache-files-dir)" >> "$GITHUB_OUTPUT"
9797

9898
- name: Get date part for cache key
9999
id: key-date
100-
run: echo "::set-output name=date::$(date +'%Y-%m')"
100+
run: echo "date=$(date +'%Y-%m')" >> "$GITHUB_OUTPUT"
101101

102102
- name: Cache composer dependencies
103-
uses: actions/cache@v1
103+
uses: actions/cache@v4
104104
with:
105105
path: ${{ steps.composer-cache.outputs.dir }}
106106
key: ${{ runner.os }}-composer-${{ steps.key-date.outputs.date }}-${{ hashFiles('composer.json') }}-${{ matrix.prefer-lowest }}

‎composer.json‎

Lines changed: 7 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -38,7 +38,8 @@
3838
"cakephp/cakephp-codesniffer": "~4.4.0",
3939
"league/flysystem-vfs": "^1.0",
4040
"phpunit/phpunit": "^9.5",
41-
"vlucas/phpdotenv": "^3.3"
41+
"vlucas/phpdotenv": "^3.3",
42+
"web-auth/webauthn-lib": "^3.3.11"
4243
},
4344
"autoload": {
4445
"psr-4": {
@@ -58,6 +59,11 @@
5859
"sort-packages": true,
5960
"allow-plugins": {
6061
"dealerdirect/phpcodesniffer-composer-installer": true
62+
},
63+
"audit": {
64+
"ignore": {
65+
"CVE-2025-45769": "Low severity; firebase/php-jwt 7.x requires PHP 8.0 and this branch supports PHP 7.4"
66+
}
6167
}
6268
},
6369
"scripts": {

0 commit comments

Comments
 (0)