Fixed the return type of getMinutesUntilExpired in BlackList, which returned a float instead of an int when using Carbon v2. #385
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 / PHPUnit | |
| on: | |
| pull_request: | |
| push: | |
| branches: | |
| - main | |
| - develop | |
| - release/** | |
| jobs: | |
| php-tests: | |
| runs-on: ubuntu-latest | |
| strategy: | |
| fail-fast: false | |
| matrix: | |
| php: [8.2, 8.3, 8.4] | |
| laravel: [10.*, 11.*, 12.*] | |
| stability: [prefer-lowest, prefer-stable] | |
| coverage: [none] | |
| include: | |
| - php: 8.3 | |
| laravel: 11.* | |
| stability: prefer-stable | |
| coverage: xdebug | |
| - php: 8.3 | |
| laravel: 11.* | |
| carbon: 3.* | |
| name: 'P${{ matrix.php }} L${{ matrix.laravel }} ${{ matrix.stability }} c:${{ matrix.coverage }}' | |
| steps: | |
| - name: Checkout code | |
| uses: actions/checkout@v4 | |
| - name: Setup PHP | |
| uses: shivammathur/setup-php@v2 | |
| with: | |
| php-version: ${{ matrix.php }} | |
| extensions: mbstring json openssl | |
| coverage: ${{ matrix.coverage }} | |
| ini-values: memory_limit=-1 | |
| - name: Setup Problem Matchers | |
| run: | | |
| echo "::add-matcher::${{ runner.tool_cache }}/php.json" | |
| echo "::add-matcher::${{ runner.tool_cache }}/phpunit.json" | |
| - name: Get composer cache directory | |
| id: composer-cache | |
| run: echo "dir=$(composer config cache-dir)" >> $GITHUB_OUTPUT | |
| - name: Set Minimum Laravel ${{ matrix.laravel }} Versions | |
| run: | | |
| composer require "illuminate/contracts:${{ matrix.laravel }}" --no-interaction --no-progress --no-update | |
| - name: Set carbon version | |
| if: ${{ matrix.carbon }} | |
| run: | | |
| composer require "nesbot/carbon:${{ matrix.carbon }}" --no-interaction --no-progress --no-update | |
| - name: Cache dependencies | |
| uses: actions/cache@v4 | |
| with: | |
| path: ${{ steps.composer-cache.outputs.dir }} | |
| key: composer-${{ runner.os }}-${{ matrix.php }}-${{ matrix.laravel }}-${{ hashFiles('composer.json') }} | |
| restore-keys: | | |
| composer-${{ runner.os }}-${{ matrix.php }}-${{ matrix.laravel }} | |
| composer-${{ runner.os }}-${{ matrix.php }}- | |
| composer-${{ runner.os }}- | |
| composer- | |
| - name: Install dependencies | |
| run: composer update --no-progress --${{ matrix.stability }} --prefer-dist --no-interaction --no-suggest | |
| - name: Execute tests (without coverage) | |
| if: matrix.coverage != 'xdebug' | |
| run: composer test -- --no-coverage | |
| - name: Execute tests (with coverage) | |
| if: matrix.coverage == 'xdebug' | |
| run: composer test:ci | |
| - name: Upload coverage | |
| uses: codecov/codecov-action@v4 | |
| if: matrix.coverage == 'xdebug' | |
| with: | |
| token: ${{ secrets.CODECOV_TOKEN }} | |
| files: ./coverage.xml | |
| codecov_yml_path: ./codecov.yml |