4
4
push :
5
5
branches :
6
6
- master
7
+ - cake5
7
8
pull_request :
8
9
branches :
9
10
- ' *'
@@ -16,11 +17,11 @@ jobs:
16
17
matrix :
17
18
php-version : ['8.1', '8.2', '8.3']
18
19
db-type : ['mysql', 'pgsql']
19
- prefer-lowest : ['' ]
20
+ dependencies : [highest ]
20
21
include :
21
22
- php-version : ' 8.1'
22
23
db-type : ' sqlite'
23
- prefer-lowest : ' prefer- lowest'
24
+ dependencies : lowest
24
25
25
26
services :
26
27
postgres :
47
48
coverage : pcov
48
49
49
50
- name : Composer install
50
- run : |
51
- composer --version
52
- if ${{ matrix.prefer-lowest == 'prefer-lowest' }}; then
53
- composer update --prefer-lowest --prefer-stable
54
- else
55
- composer install
56
- fi
51
+ uses : ramsey/composer-install@v3
52
+ with :
53
+ dependency-versions : ${{ matrix.dependencies }}
57
54
58
55
- name : Run PHPUnit
59
56
run : |
@@ -62,37 +59,40 @@ jobs:
62
59
if [[ ${{ matrix.db-type }} == 'pgsql' ]]; then export DB_URL='postgres://postgres:postgres@127.0.0.1/postgres'; fi
63
60
64
61
if [[ ${{ matrix.php-version }} == '8.1' && ${{ matrix.db-type }} == 'mysql' ]]; then
65
- vendor/bin/phpunit tests/TestCase --coverage-clover=coverage.xml
62
+ vendor/bin/phpunit --coverage-clover=coverage.xml
66
63
else
67
- vendor/bin/phpunit tests/TestCase
64
+ vendor/bin/phpunit
68
65
fi
69
66
70
67
- name : Code Coverage Report
71
68
if : success() && matrix.php-version == '8.1' && matrix.db-type == 'mysql'
72
- uses : codecov/codecov-action@v1
69
+ uses : codecov/codecov-action@v4
73
70
74
71
cs-stan :
75
72
name : Coding Standard & Static Analysis
76
73
runs-on : ubuntu-22.04
77
74
78
75
steps :
79
- - uses : actions/checkout@v2
76
+ - uses : actions/checkout@v4
80
77
81
78
- name : Setup PHP
82
79
uses : shivammathur/setup-php@v2
83
80
with :
84
81
php-version : ' 8.1'
85
82
extensions : mbstring, intl
86
83
coverage : none
87
- tools : psalm:5, phpstan:1.10
84
+ tools : psalm:5, phpstan:1.10, cs2pr
85
+
86
+ - name : Composer install
87
+ uses : ramsey/composer-install@v3
88
88
89
89
- name : Run phpcs
90
- run : vendor/bin/phpcs --standard=CakePHP src/ tests/
90
+ run : vendor/bin/phpcs --report=checkstyle | cs2pr
91
91
92
92
- name : Run psalm
93
- if : success() || failure ()
93
+ if : always ()
94
94
run : psalm --output-format=github
95
95
96
96
- name : Run phpstan
97
- if : success() || failure ()
97
+ if : always ()
98
98
run : phpstan analyse
0 commit comments