diff --git a/.github/workflows/continuous-integration.yml b/.github/workflows/continuous-integration.yml index 23f5f93..a121c0e 100644 --- a/.github/workflows/continuous-integration.yml +++ b/.github/workflows/continuous-integration.yml @@ -19,34 +19,44 @@ jobs: - "7.4" - "8.0" - "8.1" + - "8.2" + - "8.3" + - "8.4" + - "8.5" steps: - - name: "Checkout" - uses: "actions/checkout@v2" + - name: Checkout + uses: actions/checkout@v4 - - name: "Install PHP with extensions" - uses: "shivammathur/setup-php@v2" + - name: Setup PHP ${{ matrix.php-version }} + uses: shivammathur/setup-php@v2 with: - coverage: "none" - ini-values: "memory_limit=-1" - php-version: "${{ matrix.php-version }}" + php-version: ${{ matrix.php-version }} + coverage: xdebug + tools: composer:v2 + ini-values: assert.exception=1, zend.assertions=1 - - name: "Determine composer cache directory" - id: "determine-composer-cache-directory" - run: "echo \"::set-output name=directory::$(composer config cache-dir)\"" + - name: Get composer cache directory + id: composer-cache + run: echo "dir=$(composer config cache-files-dir)" >> $GITHUB_OUTPUT - - name: "Cache dependencies installed with composer" - uses: "actions/cache@v1" + - name: Cache dependencies + uses: actions/cache@v4 with: - path: "${{ steps.determine-composer-cache-directory.outputs.directory }}" - key: "php-${{ matrix.php-version }}-composer-${{ hashFiles('**/composer.json') }}" - restore-keys: "php-${{ matrix.php-version }}-composer-" + path: ${{ steps.composer-cache.outputs.dir }} + key: ${{ runner.os }}-composer-${{ hashFiles('**/composer.lock') }} + restore-keys: ${{ runner.os }}-composer- - - name: "Install dependencies with composer" - run: "composer install --no-interaction --no-progress --no-suggest" + - name: Install dependencies + run: composer install --no-interaction --prefer-dist - - name: "Run tests with phpunit/phpunit" - run: "vendor/bin/phpunit" + - name: Run test suite + run: php -d xdebug.mode=coverage ./vendor/bin/phpunit --coverage-clover=coverage.xml + + - name: Upload coverage report + uses: codecov/codecov-action@v5 + with: + fail_ci_if_error: false psalm-tests: name: "Psalm Tests" @@ -59,7 +69,7 @@ jobs: steps: - name: "Checkout" - uses: "actions/checkout@v2" + uses: "actions/checkout@v4" - name: "Install PHP with extensions" uses: "shivammathur/setup-php@v2" @@ -73,7 +83,7 @@ jobs: run: "echo \"::set-output name=directory::$(composer config cache-dir)\"" - name: "Cache dependencies installed with composer" - uses: "actions/cache@v1" + uses: "actions/cache@v4" with: path: "${{ steps.determine-composer-cache-directory.outputs.directory }}" key: "php-${{ matrix.php-version }}-composer-${{ hashFiles('**/composer.json') }}" diff --git a/.scrutinizer.yml b/.scrutinizer.yml index 7c7c845..552f1f2 100644 --- a/.scrutinizer.yml +++ b/.scrutinizer.yml @@ -1,10 +1,8 @@ +build: + nodes: + analysis: + tests: + override: + - php-scrutinizer-run filter: paths: ["src/*"] -tools: - external_code_coverage: true - php_code_coverage: true - php_sim: true - php_mess_detector: true - php_pdepend: true - php_analyzer: true - php_cpd: true diff --git a/README.md b/README.md index c5c2cd6..2cf73e0 100644 --- a/README.md +++ b/README.md @@ -22,9 +22,9 @@ Alternatively, [download a release](https://github.com/auraphp/Aura.Auth/release ### Quality -[![Scrutinizer Code Quality](https://scrutinizer-ci.com/g/auraphp/Aura.Auth/badges/quality-score.png?b=develop-2)](https://scrutinizer-ci.com/g/auraphp/Aura.Auth/?branch=develop-2) -[![Code Coverage](https://scrutinizer-ci.com/g/auraphp/Aura.Auth/badges/coverage.png?b=develop-2)](https://scrutinizer-ci.com/g/auraphp/Aura.Auth/?branch=develop-2) -[![Build Status](https://travis-ci.org/auraphp/Aura.Auth.png?branch=develop-2)](https://travis-ci.org/auraphp/Aura.Auth) +[![Scrutinizer Code Quality](https://scrutinizer-ci.com/g/auraphp/Aura.Auth/badges/quality-score.png?b=4.x)](https://scrutinizer-ci.com/g/auraphp/Aura.Auth/) +[![codecov](https://codecov.io/gh/auraphp/Aura.Auth/branch/4.x/graph/badge.svg?token=UASDouLxyc)](https://codecov.io/gh/auraphp/Aura.Auth) +[![Continuous Integration](https://github.com/auraphp/Aura.Auth/actions/workflows/continuous-integration.yml/badge.svg?branch=4.x)](https://github.com/auraphp/Aura.Auth/actions/workflows/continuous-integration.yml) To run the unit tests at the command line, issue `composer install` and then `vendor/bin/phpunit` at the package root. This requires [Composer](http://getcomposer.org/) to be available as `composer`. diff --git a/codecov.yml b/codecov.yml new file mode 100644 index 0000000..69cb760 --- /dev/null +++ b/codecov.yml @@ -0,0 +1 @@ +comment: false