77
88jobs :
99 testsuite :
10- runs-on : ubuntu-22 .04
10+ runs-on : ubuntu-24 .04
1111 strategy :
1212 fail-fast : false
1313 matrix :
14- php-version : ['8.1', '8.2']
14+ php-version : ['8.1', '8.2', '8.3', '8.4' ]
1515 db-type : [sqlite, mysql, pgsql]
1616 prefer-lowest : ['']
1717
1818 steps :
19+ - uses : actions/checkout@v4
20+ with :
21+ persist-credentials : false
22+
1923 - name : Setup MySQL latest
2024 if : matrix.db-type == 'mysql'
21- 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
25+ run : |
26+ sudo service mysql start
27+ mysql -h 127.0.0.1 -u root -proot -e 'CREATE DATABASE cakephp;'
28+
2229
2330 - name : Setup PostgreSQL latest
2431 if : matrix.db-type == 'pgsql'
2532 run : docker run --rm --name=postgres -e POSTGRES_PASSWORD=postgres -e POSTGRES_DB=cakephp -p 5432:5432 -d postgres
2633
27- - uses : actions/checkout@v2
28-
2934 - name : Setup PHP
3035 uses : shivammathur/setup-php@v2
3136 with :
3237 php-version : ${{ matrix.php-version }}
33- extensions : mbstring, intl, apcu, memcached, redis, pdo_${{ matrix.db-type }}
38+ extensions : mbstring, intl, apcu, memcached, redis, pdo_${{ matrix.db-type }}, ${{ matrix.db-type }}
3439 ini-values : apc.enable_cli = 1
3540 coverage : pcov
3641
4348 run : echo "::set-output name=date::$(date +'%Y-%m')"
4449
4550 - name : Cache composer dependencies
46- uses : actions/cache@v1
51+ uses : actions/cache@v4
4752 with :
4853 path : ${{ steps.composer-cache.outputs.dir }}
4954 key : ${{ runner.os }}-composer-${{ steps.key-date.outputs.date }}-${{ hashFiles('composer.json') }}-${{ matrix.prefer-lowest }}
@@ -57,22 +62,22 @@ jobs:
5762 fi
5863
5964 - name : Setup problem matchers for PHPUnit
60- if : matrix.php-version == '8.1 ' && matrix.db-type == 'mysql'
65+ if : matrix.php-version == '8.2 ' && matrix.db-type == 'mysql'
6166 run : echo "::add-matcher::${{ runner.tool_cache }}/phpunit.json"
6267
6368 - name : Run PHPUnit
6469 run : |
6570 if [[ ${{ matrix.db-type }} == 'sqlite' ]]; then export DB_URL='sqlite:///:memory:'; fi
66- if [[ ${{ matrix.db-type }} == 'mysql' ]]; then export DB_URL='mysql://root:root@127.0.0.1/cakephp'; fi
71+ if [[ ${{ matrix.db-type }} == 'mysql' ]]; then export DB_URL='mysql://root:root@127.0.0.1/cakephp?encoding=utf8 '; fi
6772 if [[ ${{ matrix.db-type }} == 'pgsql' ]]; then export DB_URL='postgres://postgres:postgres@127.0.0.1/postgres'; fi
68- if [[ ${{ matrix.php-version }} == '8.1 ' ]]; then
73+ if [[ ${{ matrix.php-version }} == '8.2 ' ]]; then
6974 export CODECOVERAGE=1 && vendor/bin/phpunit --coverage-clover=coverage.xml
7075 else
7176 vendor/bin/phpunit
7277 fi
7378
7479 - name : Submit code coverage
75- if : matrix.php-version == '8.1 '
80+ if : matrix.php-version == '8.2 '
7681 uses : codecov/codecov-action@v1
7782
7883 cs-stan :
8590 - name : Setup PHP
8691 uses : shivammathur/setup-php@v2
8792 with :
88- php-version : ' 8.1 '
93+ php-version : ' 8.2 '
8994 extensions : mbstring, intl, apcu, memcached, redis
9095 tools : cs2pr
9196 coverage : none
99104 run : echo "::set-output name=date::$(date +'%Y-%m')"
100105
101106 - name : Cache composer dependencies
102- uses : actions/cache@v1
107+ uses : actions/cache@v4
103108 with :
104109 path : ${{ steps.composer-cache.outputs.dir }}
105110 key : ${{ runner.os }}-composer-${{ steps.key-date.outputs.date }}-${{ hashFiles('composer.json') }}-${{ matrix.prefer-lowest }}
0 commit comments