Minor changes in README badges #205
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| name: Tests | |
| on: | |
| push: | |
| branches: | |
| - main | |
| pull_request: | |
| branches: | |
| - main | |
| jobs: | |
| php-syntax: | |
| name: Check PHP ${{ matrix.php-version }} Syntax | |
| runs-on: ubuntu-latest | |
| strategy: | |
| matrix: | |
| php-version: | |
| - "5.3" | |
| - "8.4" | |
| steps: | |
| - | |
| name: Setup PHP | |
| uses: shivammathur/setup-php@v2 | |
| with: | |
| php-version: ${{ matrix.php-version }} | |
| tools: none | |
| coverage: none | |
| extensions: opcache | |
| - | |
| name: Checkout | |
| uses: actions/checkout@v5 | |
| - | |
| name: Check syntax | |
| uses: mlocati/check-php-syntax@v1 | |
| with: | |
| directory: src | |
| include: | | |
| ../ip-lib.php | |
| fail-on-warnings: true | |
| php-coding-style: | |
| name: Check PHP coding style | |
| runs-on: ubuntu-latest | |
| steps: | |
| - | |
| name: Setup PHP | |
| uses: shivammathur/setup-php@v2 | |
| with: | |
| php-version: "8.4" | |
| extensions: mbstring, openssl, zip | |
| tools: composer:v2, php-cs-fixer:v3 | |
| coverage: none | |
| - | |
| name: Checkout | |
| uses: actions/checkout@v5 | |
| with: | |
| fetch-depth: 1 | |
| - | |
| name: Check PHP coding style | |
| run: php-cs-fixer --no-interaction --ansi --dry-run --using-cache=no --diff --format=@auto --show-progress=dots --verbose fix | |
| phpstan: | |
| name: PHPStan Analysis | |
| runs-on: ubuntu-latest | |
| steps: | |
| - | |
| name: Setup PHP | |
| uses: shivammathur/setup-php@v2 | |
| with: | |
| php-version: "8.4" | |
| extensions: mbstring, openssl, zip | |
| tools: composer:v2, phpstan:v2 | |
| coverage: none | |
| - | |
| name: Checkout | |
| uses: actions/checkout@v5 | |
| with: | |
| fetch-depth: 1 | |
| - | |
| name: Install Composer dependencies | |
| run: composer --no-interaction --ansi --no-progress --optimize-autoloader update | |
| - | |
| name: Run PHPStan | |
| run: phpstan --no-interaction --ansi --level=max --no-progress -vvv analyse | |
| phpunit: | |
| name: PHPUnit (${{ matrix.php-version }} ${{ matrix.os }}) | |
| needs: | |
| - php-syntax | |
| - php-coding-style | |
| - phpstan | |
| strategy: | |
| fail-fast: false | |
| matrix: | |
| os: | |
| - ubuntu-latest | |
| php-version: | |
| - "5.3" | |
| - "5.4" | |
| - "5.5" | |
| - "5.6" | |
| - "7.0" | |
| - "7.1" | |
| - "7.2" | |
| - "7.3" | |
| - "7.4" | |
| - "8.0" | |
| - "8.1" | |
| - "8.2" | |
| - "8.3" | |
| php-coverage: | |
| - none | |
| composer-options: | |
| - "" | |
| include: | |
| - | |
| os: ubuntu-latest | |
| php-version: "8.4" | |
| php-coverage: xdebug | |
| composer-options: --coverage-clover coverage-clover.xml | |
| - | |
| os: windows-latest | |
| php-version: "5.5" | |
| php-coverage: none | |
| composer-options: "" | |
| - | |
| os: windows-latest | |
| php-version: "7.4" | |
| php-coverage: none | |
| composer-options: "" | |
| runs-on: ${{ matrix.os }} | |
| steps: | |
| - | |
| name: Setup PHP | |
| uses: shivammathur/setup-php@v2 | |
| with: | |
| php-version: ${{ matrix.php-version }} | |
| tools: composer:v2 | |
| extensions: pdo_sqlite | |
| coverage: ${{ matrix.php-coverage }} | |
| - | |
| name: Checkout | |
| uses: actions/checkout@v5 | |
| - | |
| name: Install Composer dependencies | |
| run: composer --no-interaction --ansi --no-progress --optimize-autoloader update | |
| - | |
| name: Run PHPUnit | |
| run: composer --no-interaction --ansi run-script test -- ${{ matrix.composer-options }} | |
| - | |
| name: Download Coveralls | |
| if: matrix.php-coverage && matrix.php-coverage != 'none' | |
| run: curl -sSLf -o php-coveralls.phar https://github.com/php-coveralls/php-coveralls/releases/download/v2.8.0/php-coveralls.phar | |
| - | |
| name: Upload Coveralls data | |
| if: matrix.php-coverage && matrix.php-coverage != 'none' | |
| env: | |
| COVERALLS_REPO_TOKEN: ${{ secrets.GITHUB_TOKEN }} | |
| run: php php-coveralls.phar --no-interaction --ansi --coverage_clover=coverage-clover.xml --json_path=coveralls-upload.json -vvv |