44 push :
55 branches :
66 - master
7+ - cake5
78 pull_request :
89 workflow_dispatch :
910
@@ -13,11 +14,11 @@ jobs:
1314 strategy :
1415 fail-fast : false
1516 matrix :
16- php-version : [ '8.0 ' ]
17+ php-version : [ '8.1', '8.2 ' ]
1718 db-type : [ 'sqlite', 'mysql', 'pgsql' ]
1819 prefer-lowest : [ '' ]
1920 include :
20- - php-version : ' 8.0 '
21+ - php-version : ' 8.1 '
2122 db-type : ' sqlite'
2223 prefer-lowest : ' prefer-lowest'
2324
3031 POSTGRES_PASSWORD : postgres
3132
3233 steps :
33- - uses : actions/checkout@v2
34+ - uses : actions/checkout@v4
3435
3536 - name : Setup Service
3637 if : matrix.db-type == 'mysql'
5051 run : echo "::set-output name=dir::$(composer config cache-files-dir)"
5152
5253 - name : Cache dependencies
53- uses : actions/cache@v2
54+ uses : actions/cache@v3
5455 with :
5556 path : ${{ steps.composercache.outputs.dir }}
5657 key : ${{ runner.os }}-composer-${{ hashFiles('**/composer.json') }}
@@ -80,52 +81,48 @@ jobs:
8081 if [[ ${{ matrix.db-type }} == 'sqlite' ]]; then export DB_URL='sqlite:///:memory:'; fi
8182 if [[ ${{ matrix.db-type }} == 'mysql' ]]; then export DB_URL='mysql://root:root@127.0.0.1/cakephp?encoding=utf8'; fi
8283 if [[ ${{ matrix.db-type }} == 'pgsql' ]]; then export DB_URL='postgres://postgres:postgres@127.0.0.1/postgres'; fi
83- if [[ ${{ matrix.php-version }} == '8.0 ' && ${{ matrix.db-type }} == 'sqlite' ]]; then
84- vendor/bin/phpunit --coverage-clover=coverage.xml
84+ if [[ ${{ matrix.php-version }} == '8.1 ' && ${{ matrix.db-type }} == 'sqlite' ]]; then
85+ vendor/bin/phpunit --display-deprecations --display-incomplete --display-skipped -- coverage-clover=coverage.xml
8586 else
86- vendor/bin/phpunit
87+ vendor/bin/phpunit --display-deprecations
8788 fi
8889
8990 - name : Validate prefer-lowest
9091 run : if ${{ matrix.prefer-lowest == 'prefer-lowest' }}; then vendor/bin/validate-prefer-lowest -m; fi
9192
9293 - name : Code Coverage Report
93- if : success() && matrix.php-version == '8.0 ' && matrix.db-type == 'sqlite'
94- uses : codecov/codecov-action@v1
94+ if : success() && matrix.php-version == '8.1 ' && matrix.db-type == 'sqlite'
95+ uses : codecov/codecov-action@v3
9596
9697 validation :
9798 name : Coding Standard & Static Analysis
9899 runs-on : ubuntu-22.04
99100
100101 steps :
101- - uses : actions/checkout@v2
102+ - uses : actions/checkout@v4
102103
103104 - name : Setup PHP
104105 uses : shivammathur/setup-php@v2
105106 with :
106- php-version : ' 8.0 '
107+ php-version : ' 8.1 '
107108 extensions : mbstring, intl
108109 coverage : none
110+ tools : phive, cs2pr
109111
110- - name : Get composer cache directory
111- id : composercache
112- run : echo "::set-output name=dir::$(composer config cache-files-dir)"
112+ - name : Composer install
113+ uses : ramsey/composer-install@v2
113114
114- - name : Cache dependencies
115- uses : actions/cache@v2
116- with :
117- path : ${{ steps.composercache.outputs.dir }}
118- key : ${{ runner.os }}-composer-${{ hashFiles('**/composer.json') }}
119- restore-keys : ${{ runner.os }}-composer-
120-
121- - name : Composer phpstan setup
122- run : composer stan-setup
115+ - name : Install PHP tools with phive.
116+ run : " phive install --trust-gpg-keys 'CF1A108D0E7AE720,51C67305FFC2E5C0,12CE0F1D262429A5'"
123117
124- - name : Run phpstan
125- run : vendor/bin/phpstan analyse --error-format=github
118+ - name : Run phpcs
119+ if : always()
120+ run : vendor/bin/phpcs --report=checkstyle src/ tests/ | cs2pr
126121
127122 - name : Run psalm
128- run : vendor/bin/psalm.phar --output-format=github
123+ if : always()
124+ run : tools/psalm --output-format=github
129125
130- - name : Run phpcs
131- run : composer cs-check
126+ - name : Run phpstan
127+ if : always()
128+ run : tools/phpstan analyse --error-format=github
0 commit comments