|
| 1 | +# https://help.github.com/en/categories/automating-your-workflow-with-github-actions |
| 2 | + |
| 3 | +on: |
| 4 | + pull_request: |
| 5 | + push: |
| 6 | + branches: |
| 7 | + - master |
| 8 | + |
| 9 | +jobs: |
| 10 | + composer-validate: |
| 11 | + runs-on: ubuntu-latest |
| 12 | + |
| 13 | + steps: |
| 14 | + - uses: actions/checkout@v4 |
| 15 | + |
| 16 | + - uses: shivammathur/setup-php@v2 |
| 17 | + with: |
| 18 | + coverage: none |
| 19 | + extensions: mbstring |
| 20 | + php-version: 8.3 |
| 21 | + |
| 22 | + - run: composer validate --strict |
| 23 | + |
| 24 | + static-code-analysis: |
| 25 | + runs-on: ubuntu-latest |
| 26 | + |
| 27 | + steps: |
| 28 | + - uses: actions/checkout@v4 |
| 29 | + |
| 30 | + - uses: shivammathur/setup-php@v2 |
| 31 | + with: |
| 32 | + coverage: none |
| 33 | + extensions: mbstring |
| 34 | + php-version: 8.3 |
| 35 | + |
| 36 | + - run: composer install --no-interaction --no-progress --no-suggest |
| 37 | + |
| 38 | + - run: vendor/bin/phpstan analyse |
| 39 | + |
| 40 | + tests: |
| 41 | + name: "Tests - PHP ${{ matrix.php-version }}, Illuminate ${{ matrix.illuminate }}, ${{ matrix.dependencies }}" |
| 42 | + |
| 43 | + runs-on: ubuntu-latest |
| 44 | + |
| 45 | + strategy: |
| 46 | + matrix: |
| 47 | + php-version: |
| 48 | + - "7.4" |
| 49 | + - "8.0" |
| 50 | + - "8.1" |
| 51 | + - "8.2" |
| 52 | + - "8.3" |
| 53 | + |
| 54 | + dependencies: |
| 55 | + - lowest |
| 56 | + - highest |
| 57 | + |
| 58 | + illuminate: |
| 59 | + - ^8.73 |
| 60 | + - ^9 |
| 61 | + - ^10 |
| 62 | + exclude: |
| 63 | + - php-version: "7.4" |
| 64 | + illuminate: ^9 |
| 65 | + - php-version: "7.4" |
| 66 | + illuminate: ^10 |
| 67 | + - php-version: "8.0" |
| 68 | + illuminate: ^10 |
| 69 | + |
| 70 | + steps: |
| 71 | + - uses: actions/checkout@v4 |
| 72 | + |
| 73 | + - uses: shivammathur/setup-php@v2 |
| 74 | + with: |
| 75 | + coverage: none |
| 76 | + extensions: mbstring |
| 77 | + php-version: "${{ matrix.php-version }}" |
| 78 | + |
| 79 | + - run: composer require "illuminate/support:${{ matrix.illuminate }}" --no-interaction --no-update |
| 80 | + |
| 81 | + - if: matrix.dependencies == 'lowest' |
| 82 | + run: composer update --prefer-lowest --no-interaction --no-progress --no-suggest |
| 83 | + |
| 84 | + - if: matrix.dependencies == 'highest' |
| 85 | + run: composer update --no-interaction --no-progress --no-suggest |
| 86 | + |
| 87 | + - run: vendor/bin/phpunit |
| 88 | + |
| 89 | + code-coverage: |
| 90 | + runs-on: ubuntu-latest |
| 91 | + |
| 92 | + steps: |
| 93 | + - uses: actions/checkout@v4 |
| 94 | + |
| 95 | + - uses: shivammathur/setup-php@v2 |
| 96 | + with: |
| 97 | + coverage: pcov |
| 98 | + extensions: mbstring |
| 99 | + php-version: 8.3 |
| 100 | + |
| 101 | + - run: composer install --no-interaction --no-progress --no-suggest |
| 102 | + |
| 103 | + - run: vendor/bin/phpunit --coverage-clover=.build/logs/clover.xml |
| 104 | + |
| 105 | + - uses: codecov/codecov-action@v3 |
| 106 | + |
| 107 | + mutation-tests: |
| 108 | + runs-on: ubuntu-latest |
| 109 | + |
| 110 | + steps: |
| 111 | + - uses: actions/checkout@v4 |
| 112 | + |
| 113 | + - uses: shivammathur/setup-php@v2 |
| 114 | + with: |
| 115 | + coverage: pcov |
| 116 | + extensions: mbstring |
| 117 | + php-version: 8.3 |
| 118 | + |
| 119 | + - run: composer install --no-interaction --no-progress --no-suggest |
| 120 | + |
| 121 | + - run: vendor/bin/infection --ignore-msi-with-no-mutations --min-covered-msi=60 --min-msi=60 |
0 commit comments