Make PHPUnit fail on deprecation errors (#51) #80
  
    
      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
    
  
  
    
  | # yamllint disable rule:line-length | |
| # yamllint disable rule:braces | |
| name: Continuous Integration | |
| on: | |
| pull_request: | |
| push: | |
| branches: | |
| - main | |
| - master | |
| jobs: | |
| tests: | |
| runs-on: ${{ matrix.operating-system }} | |
| strategy: | |
| fail-fast: false | |
| matrix: | |
| operating-system: ['ubuntu-latest'] | |
| php-version: | |
| - '5.6' | |
| - '7.0' | |
| - '7.1' | |
| - '7.2' | |
| - '7.3' | |
| - '7.4' | |
| - '8.0' | |
| - '8.1' | |
| - '8.2' | |
| - '8.3' | |
| - '8.4' | |
| name: CI on ${{ matrix.operating-system }} with PHP ${{ matrix.php-version }} | |
| steps: | |
| - name: Checkout code | |
| uses: actions/checkout@v5 | |
| - name: Setup PHP | |
| uses: shivammathur/setup-php@v2 | |
| with: | |
| php-version: ${{ matrix.php-version }} | |
| tools: composer:v2 | |
| coverage: none | |
| - name: Get composer cache directory | |
| id: composer-cache | |
| run: echo "dir=$(composer config cache-files-dir)" >> $GITHUB_ENV | |
| - name: Cache dependencies | |
| uses: actions/cache@v4 | |
| with: | |
| path: ${{ env.dir }} | |
| key: composer-${{ runner.os }}-${{ matrix.php-version }}-${{ hashFiles('**/composer.json') }} | |
| restore-keys: | | |
| composer-${{ runner.os }}-${{ matrix.php-version }}- | |
| composer-${{ runner.os }}- | |
| - name: Install dependencies | |
| run: | | |
| composer remove --no-update --dev friendsofphp/php-cs-fixer phpstan/phpstan | |
| composer install --no-interaction --prefer-dist --no-progress | |
| - name: Lint code | |
| run: | | |
| vendor/bin/parallel-lint --exclude .git --exclude vendor . | |
| - name: Run tests | |
| run: | | |
| vendor/bin/phpunit | |
| - name: Run static analysis | |
| run: | | |
| composer dump-autoload --optimize | |
| vendor/bin/phpunit test/Test/StaticAnalysisTest.php |