Skip to content

Commit 3a94290

Browse files
committedMay 12, 2024·
Update CI config
1 parent 96dc833 commit 3a94290

File tree

1 file changed

+17
-17
lines changed

1 file changed

+17
-17
lines changed
 

‎.github/workflows/ci.yml

+17-17
Original file line numberDiff line numberDiff line change
@@ -4,6 +4,7 @@ on:
44
push:
55
branches:
66
- master
7+
- cake5
78
pull_request:
89
branches:
910
- '*'
@@ -16,11 +17,11 @@ jobs:
1617
matrix:
1718
php-version: ['8.1', '8.2', '8.3']
1819
db-type: ['mysql', 'pgsql']
19-
prefer-lowest: ['']
20+
dependencies: [highest]
2021
include:
2122
- php-version: '8.1'
2223
db-type: 'sqlite'
23-
prefer-lowest: 'prefer-lowest'
24+
dependencies: lowest
2425

2526
services:
2627
postgres:
@@ -47,13 +48,9 @@ jobs:
4748
coverage: pcov
4849

4950
- 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 }}
5754

5855
- name: Run PHPUnit
5956
run: |
@@ -62,37 +59,40 @@ jobs:
6259
if [[ ${{ matrix.db-type }} == 'pgsql' ]]; then export DB_URL='postgres://postgres:postgres@127.0.0.1/postgres'; fi
6360
6461
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
6663
else
67-
vendor/bin/phpunit tests/TestCase
64+
vendor/bin/phpunit
6865
fi
6966
7067
- name: Code Coverage Report
7168
if: success() && matrix.php-version == '8.1' && matrix.db-type == 'mysql'
72-
uses: codecov/codecov-action@v1
69+
uses: codecov/codecov-action@v4
7370

7471
cs-stan:
7572
name: Coding Standard & Static Analysis
7673
runs-on: ubuntu-22.04
7774

7875
steps:
79-
- uses: actions/checkout@v2
76+
- uses: actions/checkout@v4
8077

8178
- name: Setup PHP
8279
uses: shivammathur/setup-php@v2
8380
with:
8481
php-version: '8.1'
8582
extensions: mbstring, intl
8683
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
8888

8989
- name: Run phpcs
90-
run: vendor/bin/phpcs --standard=CakePHP src/ tests/
90+
run: vendor/bin/phpcs --report=checkstyle | cs2pr
9191

9292
- name: Run psalm
93-
if: success() || failure()
93+
if: always()
9494
run: psalm --output-format=github
9595

9696
- name: Run phpstan
97-
if: success() || failure()
97+
if: always()
9898
run: phpstan analyse

0 commit comments

Comments
 (0)
Please sign in to comment.