|
| 1 | +name: Unit Tests |
| 2 | + |
| 3 | +on: [push, pull_request] |
| 4 | + |
| 5 | +jobs: |
| 6 | + run: |
| 7 | + name: PHP ${{ matrix.php-versions }} |
| 8 | + runs-on: ubuntu-latest |
| 9 | + if: github.event_name == 'push' || github.event.pull_request.head.repo.full_name != github.repository |
| 10 | + |
| 11 | + strategy: |
| 12 | + matrix: |
| 13 | + php-versions: ['7.2', '7.3', '7.4', '8.0'] |
| 14 | + fail-fast: false |
| 15 | + |
| 16 | + steps: |
| 17 | + - name: Checkout |
| 18 | + uses: actions/checkout@v2 |
| 19 | + |
| 20 | + - name: Setup PHP |
| 21 | + uses: shivammathur/setup-php@v2 |
| 22 | + with: |
| 23 | + php-version: ${{ matrix.php-versions }} |
| 24 | + |
| 25 | + - name: Setup problem matchers |
| 26 | + run: | |
| 27 | + echo ::add-matcher::${{ runner.tool_cache }}/php.json |
| 28 | + echo ::add-matcher::${{ runner.tool_cache }}/phpunit.json |
| 29 | + |
| 30 | + - name: Setup Dependencies |
| 31 | + run: | |
| 32 | + composer update |
| 33 | + composer install |
| 34 | + - name: Run PHPUnit |
| 35 | + run: | |
| 36 | + ./vendor/bin/phpunit --verbose |
0 commit comments