feat: add compare method for return int #272
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: Continuous Integration | |
| on: | |
| push: | |
| branches: [ "4.x" ] | |
| pull_request: | |
| branches: [ "4.x" ] | |
| jobs: | |
| code-style: | |
| strategy: | |
| matrix: | |
| version: [ 8.1, 8.2 ] | |
| runs-on: ubuntu-latest | |
| steps: | |
| - name: Checkout | |
| uses: actions/checkout@v3 | |
| - name: Setup PHP | |
| uses: shivammathur/setup-php@v2 | |
| with: | |
| php-version: ${{ matrix.version }} | |
| - name: Get Composer Cache Directory | |
| id: composer-cache | |
| run: echo "dir=$(composer config cache-files-dir)" >> $GITHUB_OUTPUT | |
| - uses: actions/cache@v3 | |
| with: | |
| path: ${{ steps.composer-cache.outputs.dir }} | |
| key: ${{ runner.os }}-${{ matrix.version }}-composer-${{ hashFiles('**/composer.json') }} | |
| restore-keys: ${{ runner.os }}-${{ matrix.version }}-composer- | |
| - name: Install dependencies | |
| run: composer install -q --no-ansi --no-interaction --no-scripts --no-progress --prefer-dist | |
| - name: PHP code sniffer | |
| run: composer app:cs | |
| tests: | |
| strategy: | |
| matrix: | |
| version: [ 8.1, 8.2 ] | |
| runs-on: ubuntu-latest | |
| steps: | |
| - name: Checkout | |
| uses: actions/checkout@v3 | |
| - name: Setup PHP | |
| uses: shivammathur/setup-php@v2 | |
| with: | |
| php-version: ${{ matrix.version }} | |
| coverage: pcov | |
| extensions: bcmath | |
| - name: Get Composer Cache Directory | |
| id: composer-cache | |
| run: echo "dir=$(composer config cache-files-dir)" >> $GITHUB_OUTPUT | |
| - uses: actions/cache@v3 | |
| with: | |
| path: ${{ steps.composer-cache.outputs.dir }} | |
| key: ${{ runner.os }}-${{ matrix.version }}-composer-${{ hashFiles('**/composer.json') }} | |
| restore-keys: ${{ runner.os }}-${{ matrix.version }}-composer- | |
| - name: Install dependencies | |
| run: composer install -q --no-ansi --no-interaction --no-scripts --no-progress --prefer-dist | |
| - name: PHPUnit | |
| run: composer app:test | |
| - name: Upload coverage on Codecov | |
| if: matrix.version == '8.2' | |
| uses: codecov/codecov-action@v3 | |
| with: | |
| token: ${{ secrets.CODECOV_TOKEN }} |