mirror of
https://gitee.com/hyperf/hyperf.git
synced 2024-12-01 19:27:39 +08:00
Split cs fix from tests (#5821)
* Split cs fix from tests * Optimize CI name * Optimize --------- Co-authored-by: Deeka Wong <8337659+huangdijia@users.noreply.github.com>
This commit is contained in:
parent
0e745ffeea
commit
9e850b336c
25
.github/workflows/test.yml
vendored
25
.github/workflows/test.yml
vendored
@ -7,7 +7,28 @@ on:
|
||||
- cron: '0 2 * * *'
|
||||
|
||||
jobs:
|
||||
ci:
|
||||
cs-fix:
|
||||
name: PHP CS Fix on PHP${{ matrix.php }} ${{ matrix.swoole }}
|
||||
runs-on: ubuntu-latest
|
||||
strategy:
|
||||
matrix:
|
||||
os: [ ubuntu-latest ]
|
||||
php: [ '8.1' ]
|
||||
swoole: [ 'swoole']
|
||||
steps:
|
||||
- name: Checkout
|
||||
uses: actions/checkout@v2
|
||||
- name: Setup PHP
|
||||
uses: shivammathur/setup-php@v2
|
||||
with:
|
||||
php-version: '8.1'
|
||||
tools: php-cs-fixer
|
||||
extensions: redis, pdo, pdo_mysql, bcmath, ${{ matrix.swoole }}
|
||||
- name: Setup Packages
|
||||
run: composer update -oW
|
||||
- name: Run CS Fix
|
||||
run: vendor/bin/php-cs-fixer fix src --dry-run
|
||||
tests:
|
||||
name: Test on PHP${{ matrix.php-version }} Swoole-${{ matrix.sw-version }}
|
||||
runs-on: "${{ matrix.os }}"
|
||||
strategy:
|
||||
@ -52,7 +73,7 @@ jobs:
|
||||
php --ri swoole
|
||||
- name: Setup Packages
|
||||
run: ./.travis/requirement.install.sh
|
||||
- name: Run Check
|
||||
- name: Run PHPStan
|
||||
run: ./.travis/run.check.sh
|
||||
- name: Setup Services
|
||||
run: ./.travis/setup.services.sh
|
||||
|
@ -2,9 +2,4 @@
|
||||
|
||||
set -e
|
||||
|
||||
PHP_VER=$(php -r "echo PHP_VERSION_ID;")
|
||||
|
||||
if [ $PHP_VER -ge 80100 ]; then
|
||||
PHP_CS_FIXER_IGNORE_ENV=1 vendor/bin/php-cs-fixer fix src --dry-run
|
||||
fi
|
||||
composer analyse src
|
||||
|
Loading…
Reference in New Issue
Block a user