diff --git a/.github/workflows/ci.yaml b/.github/workflows/ci.yaml index dcc8695b4d..811dc84101 100644 --- a/.github/workflows/ci.yaml +++ b/.github/workflows/ci.yaml @@ -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" @@ -16,16 +41,10 @@ jobs: strategy: fail-fast: false matrix: - experimental: [ false ] php: - '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 @@ -41,7 +60,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" @@ -49,10 +67,6 @@ jobs: - 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 @@ -84,12 +98,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 @@ -105,7 +115,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" @@ -144,12 +153,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 @@ -165,7 +170,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"