Skip to content

Commit

Permalink
Update CI config
Browse files Browse the repository at this point in the history
  • Loading branch information
ADmad committed May 12, 2024
1 parent 96dc833 commit 023b1f5
Showing 1 changed file with 12 additions and 8 deletions.
20 changes: 12 additions & 8 deletions .github/workflows/ci.yml
Original file line number Diff line number Diff line change
Expand Up @@ -4,6 +4,7 @@ on:
push:
branches:
- master
- cake5
pull_request:
branches:
- '*'
Expand Down Expand Up @@ -62,37 +63,40 @@ jobs:
if [[ ${{ matrix.db-type }} == 'pgsql' ]]; then export DB_URL='postgres://postgres:[email protected]/postgres'; fi
if [[ ${{ matrix.php-version }} == '8.1' && ${{ matrix.db-type }} == 'mysql' ]]; then
vendor/bin/phpunit tests/TestCase --coverage-clover=coverage.xml
vendor/bin/phpunit --coverage-clover=coverage.xml
else
vendor/bin/phpunit tests/TestCase
vendor/bin/phpunit
fi
- name: Code Coverage Report
if: success() && matrix.php-version == '8.1' && matrix.db-type == 'mysql'
uses: codecov/codecov-action@v1
uses: codecov/codecov-action@v4

cs-stan:
name: Coding Standard & Static Analysis
runs-on: ubuntu-22.04

steps:
- uses: actions/checkout@v2
- uses: actions/checkout@v4

- name: Setup PHP
uses: shivammathur/setup-php@v2
with:
php-version: '8.1'
extensions: mbstring, intl
coverage: none
tools: psalm:5, phpstan:1.10
tools: psalm:5, phpstan:1.10, cs2pr

- name: Composer install
uses: ramsey/composer-install@v2

- name: Run phpcs
run: vendor/bin/phpcs --standard=CakePHP src/ tests/
run: vendor/bin/phpcs | cs2pr

- name: Run psalm
if: success() || failure()
if: always()
run: psalm --output-format=github

- name: Run phpstan
if: success() || failure()
if: always()
run: phpstan analyse

0 comments on commit 023b1f5

Please sign in to comment.