From 3b7d3c2c34780816fd3773007c80b5831b1cc0df Mon Sep 17 00:00:00 2001 From: Pig Fang Date: Thu, 4 Jun 2020 21:50:46 +0800 Subject: [PATCH] add cs check on CI --- .github/workflows/CI.yml | 10 +++++++--- 1 file changed, 7 insertions(+), 3 deletions(-) diff --git a/.github/workflows/CI.yml b/.github/workflows/CI.yml index 3930c23d..461dcbe1 100644 --- a/.github/workflows/CI.yml +++ b/.github/workflows/CI.yml @@ -15,8 +15,8 @@ on: - '**.md' jobs: - twig: - name: Twig Linting + php-lint: + name: PHP Linting runs-on: ubuntu-latest if: "!contains(github.event.head_commit.message, 'skip ci')" steps: @@ -29,13 +29,17 @@ jobs: coverage: none extensions: mbstring, dom, fileinfo, gd - name: Install dependencies - run: composer install --prefer-dist --no-progress --no-suggest + run: | + composer install --prefer-dist --no-progress --no-suggest + composer global require friendsofphp/php-cs-fixer - name: Prepare run: | cp .env.example .env php artisan key:generate - name: Validate Twig templates run: php artisan twig:lint -v + - name: Check coding style + run: php-cs-fixer fix --dry-run --stop-on-violation --diff-format=udiff php: name: PHP ${{ matrix.php }} Tests runs-on: ubuntu-latest