Skip to content

Commit

Permalink
[CI] Moved php-cs-fixer to another job
Browse files Browse the repository at this point in the history
For more details see #271
  • Loading branch information
Konrad Oboza authored Dec 14, 2021
1 parent 4be1233 commit b411f65
Showing 1 changed file with 31 additions and 27 deletions.
58 changes: 31 additions & 27 deletions .github/workflows/ci.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -8,6 +8,31 @@ on:
pull_request: ~

jobs:
cs_fix:
name: Run code style check
runs-on: "ubuntu-20.04"
strategy:
matrix:
php:
- '8.0'
steps:
- uses: actions/checkout@v2

- name: Setup PHP Action
uses: shivammathur/setup-php@v2
with:
php-version: ${{ matrix.php }}
coverage: none
extensions: 'pdo_sqlite, gd'
tools: cs2pr

- uses: "ramsey/composer-install@v1"
with:
dependency-versions: "highest"

- name: Run code style check
run: composer run-script check-cs -- --format=checkstyle | cs2pr

tests:
name: Unit tests & SQLite integration tests
runs-on: "ubuntu-20.04"
Expand All @@ -16,17 +41,11 @@ jobs:
strategy:
fail-fast: false
matrix:
experimental: [ false ]
php:
- '7.3'
- '7.4'
composer_options: [ "" ]
include:
- php: '8.0'
composer_options: "--ignore-platform-req php"
- php: '8.1'
composer_options: "--ignore-platform-req php"
skip_code_style: true
- '8.0'
- '8.1'

steps:
- uses: actions/checkout@v2
Expand All @@ -42,18 +61,13 @@ jobs:
- uses: "ramsey/composer-install@v1"
with:
dependency-versions: "highest"
composer-options: "${{ matrix.composer_options }}"

- name: Setup problem matchers for PHPUnit
run: echo "::add-matcher::${{ runner.tool_cache }}/phpunit.json"

- name: Run PHPStan analysis
run: composer run-script phpstan

- name: Run code style check
if: matrix.skip_code_style != true
run: composer run-script check-cs -- --format=checkstyle | cs2pr

- name: Run unit test suite
run: composer run-script unit

Expand Down Expand Up @@ -86,12 +100,8 @@ jobs:
php:
- '7.3'
- '7.4'
composer_options: [ "" ]
include:
- php: '8.0'
composer_options: "--ignore-platform-req php"
- php: '8.1'
composer_options: "--ignore-platform-req php"
- '8.0'
- '8.1'

steps:
- uses: actions/checkout@v2
Expand All @@ -107,7 +117,6 @@ jobs:
- uses: "ramsey/composer-install@v1"
with:
dependency-versions: "highest"
composer-options: "${{ matrix.composer_options }}"

- name: Setup problem matchers for PHPUnit
run: echo "::add-matcher::${{ runner.tool_cache }}/phpunit.json"
Expand Down Expand Up @@ -146,12 +155,8 @@ jobs:
matrix:
php:
- '7.4'
composer_options: [ "" ]
include:
- php: '8.0'
composer_options: "--ignore-platform-req php"
- php: '8.1'
composer_options: "--ignore-platform-req php"
- '8.0'
- '8.1'

steps:
- uses: actions/checkout@v2
Expand All @@ -167,7 +172,6 @@ jobs:
- uses: "ramsey/composer-install@v1"
with:
dependency-versions: "highest"
composer-options: "${{ matrix.composer_options }}"

- name: Setup problem matchers for PHPUnit
run: echo "::add-matcher::${{ runner.tool_cache }}/phpunit.json"
Expand Down

0 comments on commit b411f65

Please # to comment.