diff --git a/.github/workflows/ci.yaml b/.github/workflows/ci.yaml index 1cd66e9138..80dea8c40f 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,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 @@ -42,7 +61,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" @@ -50,10 +68,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 @@ -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 @@ -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" @@ -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 @@ -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"