diff --git a/.github/workflows/check-cs.yml b/.github/workflows/check-cs.yml index cec58f8..eac7b75 100644 --- a/.github/workflows/check-cs.yml +++ b/.github/workflows/check-cs.yml @@ -7,6 +7,8 @@ on: pull_request: branches: - "*" + # Allow manually triggering the workflow. + workflow_dispatch: jobs: fix-style: @@ -25,11 +27,14 @@ jobs: with: php-version: 7.4 coverage: none - tools: composer + tools: composer, cs2pr - name: Install dependencies run: | composer update --prefer-dist --no-suggest --no-progress - name: Check Code Style - run: vendor/bin/phpcs + run: vendor/bin/phpcs --report-full --report-checkstyle=./phpcs-report.xml + + - name: Show PHPCS results in PR + run: cs2pr ./phpcs-report.xml diff --git a/.github/workflows/run-tests.yml b/.github/workflows/run-tests.yml index 0af5e2d..f873179 100644 --- a/.github/workflows/run-tests.yml +++ b/.github/workflows/run-tests.yml @@ -9,6 +9,8 @@ on: - "*" schedule: - cron: '0 0 * * *' + # Allow manually triggering the workflow. + workflow_dispatch: jobs: php-tests: @@ -19,10 +21,17 @@ jobs: strategy: matrix: - php: [8.x, 7.4, 7.3] + php: ['8.0', '7.4', '7.3'] dependency-version: [prefer-lowest, prefer-stable] + experimental: [false] + + include: + - php: '8.1' + dependency-version: 'prefer-stable' + experimental: true name: P${{ matrix.php }} - ${{ matrix.dependency-version }} + continue-on-error: ${{ matrix.experimental }} steps: - name: Checkout code @@ -35,9 +44,15 @@ jobs: coverage: none tools: composer - - name: Install dependencies + - name: Install dependencies - normal + if: ${{ matrix.php < 8.1 }} run: | composer update --${{ matrix.dependency-version }} --prefer-dist --no-progress + - name: Install dependencies - ignore platform reqs + if: ${{ matrix.php >= 8.1 }} + run: | + composer update --${{ matrix.dependency-version }} --prefer-dist --no-progress --ignore-platform-reqs + - name: Execute Unit Tests run: vendor/bin/phpunit