diff --git a/.github/workflows/ci.yml b/.github/workflows/ci.yml index 4239750..30a3ef5 100644 --- a/.github/workflows/ci.yml +++ b/.github/workflows/ci.yml @@ -1,30 +1,34 @@ name: CI -on: [push, pull_request] +on: + push: + branches: [main] + pull_request: + +concurrency: + group: ci-${{ github.head_ref || github.ref }} + cancel-in-progress: true jobs: build-test: runs-on: ubuntu-latest strategy: matrix: - php_version: ["8.1", "8.2", "8.3", "8.4"] + php_version: ["8.2", "8.3", "8.4", "8.5"] composer_flags: ["", "--prefer-lowest"] steps: - - uses: actions/checkout@v2 + - uses: actions/checkout@v4 - name: Setup PHP uses: shivammathur/setup-php@v2 with: php-version: ${{ matrix.php_version }} extensions: xdebug + tools: composer:v2 - name: Install dependencies - uses: php-actions/composer@v5 - with: - php_version: ${{ matrix.php_version }} - args: ${{ matrix.composer_flags }} - command: update + run: composer update --no-interaction --prefer-dist ${{ matrix.composer_flags }} - name: Run tests run: ./vendor/bin/phpunit --coverage-clover ./tests/logs/clover.xml @@ -33,14 +37,3 @@ jobs: - name: Run Codesniffer run: vendor/bin/phpcs --standard=PSR2 ./src - - # - name: Submit coverage to Coveralls - # # We use php-coveralls library for this, as the official Coveralls GitHub Action lacks support for clover reports: - # # https://github.com/coverallsapp/github-action/issues/15 - # env: - # COVERALLS_REPO_TOKEN: ${{ secrets.GITHUB_TOKEN }} - # COVERALLS_PARALLEL: true - # COVERALLS_FLAG_NAME: ${{ github.job }}-PHP-${{ matrix.php_version }} ${{ matrix.composer_flags }} - # run: | - # composer global require php-coveralls/php-coveralls - # ~/.composer/vendor/bin/php-coveralls -v diff --git a/composer.json b/composer.json index 63c8c1b..b4cbf9f 100644 --- a/composer.json +++ b/composer.json @@ -4,7 +4,7 @@ "php": ">=8.1", "symfony/finder": "^6.4.24", "twig/twig": "^3.21.1", - "illuminate/collections": "^10", + "illuminate/collections": "^10 || ^11", "league/commonmark": "^2.7.1", "spatie/yaml-front-matter": "^2.1" },