|
| 1 | +name: CI |
| 2 | + |
| 3 | +on: |
| 4 | + pull_request: null |
| 5 | + push: |
| 6 | + branches: |
| 7 | + - master |
| 8 | + |
| 9 | +jobs: |
| 10 | + Tests: |
| 11 | + runs-on: ubuntu-latest |
| 12 | + continue-on-error: ${{ matrix.experimental == true }} |
| 13 | + strategy: |
| 14 | + matrix: |
| 15 | + php: |
| 16 | + - '7.4' |
| 17 | + - '7.3' |
| 18 | + - '7.2' |
| 19 | + - '7.1' |
| 20 | + sentry_constraint: [false] |
| 21 | + symfony_constraint: [false] |
| 22 | + experimental: [false] |
| 23 | + include: |
| 24 | +# - description: 'sentry/sentry dev-develop' |
| 25 | +# php: '7.4' |
| 26 | +# sentry_constraint: 'dev-develop' |
| 27 | +# experimental: true |
| 28 | + - description: 'Symfony 4.4' |
| 29 | + php: '7.3' |
| 30 | + symfony_constraint: 4.4.* |
| 31 | + - description: 'Symfony 3.4' |
| 32 | + php: '7.1' |
| 33 | + symfony_constraint: 3.4.* |
| 34 | + env: |
| 35 | + SYMFONY_DEPRECATIONS_HELPER: disabled |
| 36 | + - description: 'prefer lowest' |
| 37 | + php: '7.1' |
| 38 | + composer_option: '--prefer-lowest' |
| 39 | + symfony_constraint: 3.4.* |
| 40 | + env: |
| 41 | + SYMFONY_DEPRECATIONS_HELPER: disabled |
| 42 | + |
| 43 | + name: PHP ${{ matrix.php }} tests (${{ matrix.description }}) |
| 44 | + steps: |
| 45 | + - uses: actions/checkout@v2 |
| 46 | + - uses: actions/cache@v2 |
| 47 | + with: |
| 48 | + path: ~/.composer/cache/files |
| 49 | + key: ${{ matrix.php }}-${{ matrix.symfony_constraint }}-${{ matrix.composer_option }} |
| 50 | + - uses: shivammathur/setup-php@v1 |
| 51 | + with: |
| 52 | + php-version: ${{ matrix.php }} |
| 53 | + coverage: xdebug |
| 54 | + - run: | |
| 55 | + sed -ri '/symfony\/(monolog-bundle|phpunit-bridge|messenger)/! s/"symfony\/(.+)": "(.+)"/"symfony\/\1": "'${{ matrix.symfony_constraint }}'"/' composer.json; |
| 56 | + if: matrix.symfony_constraint |
| 57 | + - run: composer remove --dev symfony/messenger --no-update |
| 58 | + if: matrix.symfony_constraint == '3.4.*' |
| 59 | + - run: composer update --no-progress --ansi ${{ matrix.composer_option }} |
| 60 | + - run: composer require sentry/sentry dev-develop |
| 61 | + if: matrix.sentry_constraint == 'dev-develop' |
| 62 | + - run: vendor/bin/phpunit --coverage-clover=coverage.xml |
| 63 | + - uses: codecov/codecov-action@v1 |
| 64 | + with: |
| 65 | + file: './coverage.xml' |
| 66 | + fail_ci_if_error: true |
| 67 | + PHP-CS-Fixer: |
| 68 | + runs-on: ubuntu-latest |
| 69 | + name: Code style |
| 70 | + steps: |
| 71 | + - uses: actions/checkout@v2 |
| 72 | + - uses: actions/cache@v2 |
| 73 | + with: |
| 74 | + path: ~/.composer/cache/files |
| 75 | + key: '7.4--' |
| 76 | + - uses: shivammathur/setup-php@v1 |
| 77 | + with: |
| 78 | + php-version: '7.4' |
| 79 | + - run: composer install --no-progress --ansi |
| 80 | + - run: vendor/bin/php-cs-fixer fix --ansi --verbose --dry-run |
| 81 | + PHPStan: |
| 82 | + runs-on: ubuntu-latest |
| 83 | + name: PHPStan |
| 84 | + steps: |
| 85 | + - uses: actions/checkout@v2 |
| 86 | + - uses: actions/cache@v2 |
| 87 | + with: |
| 88 | + path: ~/.composer/cache/files |
| 89 | + key: '7.4--' |
| 90 | + - uses: shivammathur/setup-php@v1 |
| 91 | + with: |
| 92 | + php-version: '7.4' |
| 93 | + - run: composer install --no-progress --ansi |
| 94 | + - run: vendor/bin/phpstan analyse |
0 commit comments