performance improvement for integer #12
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: PHP Unit Tests | |
| on: | |
| push: | |
| branches: [ master ] | |
| pull_request: | |
| branches: [ master ] | |
| jobs: | |
| test: | |
| runs-on: ubuntu-latest | |
| strategy: | |
| matrix: | |
| php-versions: ['7.4', '8.0', '8.1', '8.2', '8.3', '8.4'] | |
| dependency-version: [prefer-lowest, prefer-stable] | |
| name: PHP ${{ matrix.php-versions }} - ${{ matrix.dependency-version }} | |
| steps: | |
| - name: Checkout code | |
| uses: actions/checkout@v4 | |
| - name: Setup PHP | |
| uses: shivammathur/setup-php@v2 | |
| with: | |
| php-version: ${{ matrix.php-versions }} | |
| extensions: mbstring, dom, fileinfo, mysql, redis | |
| coverage: xdebug | |
| tools: composer:v2 | |
| - name: Check PHP Version | |
| run: php -v | |
| - name: Validate composer.json and composer.lock | |
| run: composer validate --strict | |
| - name: Cache Composer packages | |
| id: composer-cache | |
| uses: actions/cache@v3 | |
| with: | |
| path: vendor | |
| key: ${{ runner.os }}-php-${{ matrix.php-versions }}-${{ matrix.dependency-version }}-${{ hashFiles('**/composer.lock') }} | |
| restore-keys: | | |
| ${{ runner.os }}-php-${{ matrix.php-versions }}-${{ matrix.dependency-version }}- | |
| - name: Install dependencies | |
| run: | | |
| composer update --${{ matrix.dependency-version }} --prefer-dist --no-progress --no-suggest | |
| - name: Run test suite | |
| run: vendor/bin/phpunit | |
| - name: Run PHPUnit with coverage | |
| if: matrix.php-versions == '8.4' && matrix.dependency-version == 'prefer-stable' | |
| run: vendor/bin/phpunit --coverage-clover build/logs/clover.xml | |
| - name: Upload coverage to Codecov | |
| if: matrix.php-versions == '8.4' && matrix.dependency-version == 'prefer-stable' | |
| uses: codecov/codecov-action@v3 | |
| with: | |
| token: ${{ secrets.CODECOV_TOKEN }} | |
| file: ./build/logs/clover.xml | |
| flags: unittests | |
| name: codecov-umbrella | |
| fail_ci_if_error: false |