|
1 |
| -name: CI |
| 1 | +name: Continuous Integration |
2 | 2 |
|
3 | 3 | on:
|
4 | 4 | pull_request: null
|
|
9 | 9 | - 3.5.x
|
10 | 10 |
|
11 | 11 | jobs:
|
12 |
| - Tests: |
| 12 | + tests: |
| 13 | + name: Tests |
13 | 14 | runs-on: ubuntu-latest
|
14 |
| - continue-on-error: ${{ matrix.experimental == true }} |
15 | 15 | env:
|
16 |
| - SYMFONY_REQUIRE: ${{matrix.symfony_constraint}} |
| 16 | + SYMFONY_REQUIRE: ${{ matrix.symfony-version }} |
17 | 17 | strategy:
|
18 | 18 | fail-fast: false
|
19 | 19 | matrix:
|
20 | 20 | php:
|
21 |
| - - '8.0' |
22 |
| - - '7.4' |
23 |
| - - '7.3' |
24 | 21 | - '7.2'
|
25 |
| - sentry_constraint: [false] |
26 |
| - symfony_constraint: [''] |
27 |
| - experimental: [false] |
28 |
| - include: |
29 |
| - - description: 'Symfony 5.0' |
30 |
| - php: '8.0' |
31 |
| - symfony_constraint: 5.0.* |
32 |
| - - description: 'Symfony 5.0' |
33 |
| - php: '7.4' |
34 |
| - symfony_constraint: 5.0.* |
35 |
| - - description: 'Symfony 4.4' |
36 |
| - php: '8.0' |
37 |
| - symfony_constraint: 4.4.* |
38 |
| - - description: 'Symfony 4.4' |
39 |
| - php: '7.4' |
40 |
| - symfony_constraint: 4.4.* |
41 |
| - - description: 'Symfony 3.4' |
42 |
| - php: '7.2' |
43 |
| - symfony_constraint: 3.4.* |
44 |
| - env: |
45 |
| - SYMFONY_DEPRECATIONS_HELPER: disabled |
46 |
| - - description: 'prefer lowest' |
47 |
| - php: '7.2' |
48 |
| - composer_option: '--prefer-lowest' |
49 |
| - env: |
50 |
| - SYMFONY_DEPRECATIONS_HELPER: disabled |
51 |
| - |
52 |
| - name: PHP ${{ matrix.php }} tests (${{ matrix.description }}) |
| 22 | + - '7.3' |
| 23 | + - '7.4' |
| 24 | + - '8.0' |
| 25 | + symfony-version: |
| 26 | + - 3.4.* |
| 27 | + - 4.4.* |
| 28 | + - 5.2.* |
| 29 | + dependencies: |
| 30 | + - lowest |
| 31 | + - highest |
| 32 | + |
53 | 33 | steps:
|
54 | 34 | - name: Checkout
|
55 | 35 | uses: actions/checkout@v2
|
56 | 36 | with:
|
57 | 37 | fetch-depth: 2
|
58 | 38 |
|
59 |
| - - name: Cache |
60 |
| - uses: actions/cache@v2 |
61 |
| - with: |
62 |
| - path: ~/.composer/cache/files |
63 |
| - key: ${{ matrix.php }}-${{ matrix.symfony_constraint }}-${{ matrix.composer_option }} |
64 |
| - |
65 | 39 | - name: Setup PHP
|
66 | 40 | uses: shivammathur/setup-php@v2
|
67 | 41 | with:
|
68 | 42 | php-version: ${{ matrix.php }}
|
69 | 43 | coverage: xdebug
|
70 | 44 |
|
71 |
| - - name: Install Symfony Flex |
72 |
| - run: composer global require --no-progress --no-scripts --no-plugins symfony/flex |
| 45 | + - name: Setup Problem Matchers for PHPUnit |
| 46 | + run: echo "::add-matcher::${{ runner.tool_cache }}/phpunit.json" |
| 47 | + |
| 48 | + - name: Determine Composer cache directory |
| 49 | + id: composer-cache |
| 50 | + run: echo "::set-output name=directory::$(composer config cache-dir)" |
| 51 | + |
| 52 | + - name: Cache Composer dependencies |
| 53 | + uses: actions/cache@v2 |
| 54 | + with: |
| 55 | + path: ${{ steps.composer-cache.outputs.directory }} |
| 56 | + key: ${{ runner.os }}-${{ matrix.php }}-composer-${{ matrix.dependencies }}-${{ hashFiles('**/composer.lock') }} |
| 57 | + restore-keys: ${{ runner.os }}-${{ matrix.php }}-${{ matrix.dependencies }}-composer- |
73 | 58 |
|
74 | 59 | - name: Remove Symfony Messenger
|
75 | 60 | run: composer remove --dev symfony/messenger --no-update
|
76 |
| - if: matrix.symfony_constraint == '3.4.*' || matrix.composer_option == '--prefer-lowest' |
| 61 | + if: matrix.symfony-version == '3.4.*' || matrix.composer_option == '--prefer-lowest' |
| 62 | + |
| 63 | + - name: Install Symfony Flex |
| 64 | + run: composer global require --no-progress --no-scripts --no-plugins symfony/flex |
77 | 65 |
|
78 |
| - - name: Install dependencies |
79 |
| - run: composer update --no-progress --ansi ${{ matrix.composer_option }} |
| 66 | + - name: Install highest dependencies |
| 67 | + run: composer update --no-progress --no-interaction --prefer-dist |
| 68 | + if: ${{ matrix.dependencies == 'highest' }} |
80 | 69 |
|
81 |
| - - name: Install Sentry |
82 |
| - run: composer require sentry/sentry dev-develop |
83 |
| - if: matrix.sentry_constraint == 'dev-develop' |
| 70 | + - name: Install lowest dependencies |
| 71 | + run: composer update --no-progress --no-interaction --prefer-dist --prefer-lowest |
| 72 | + if: ${{ matrix.dependencies == 'lowest' }} |
84 | 73 |
|
85 |
| - - name: Run PHPUnit tests |
86 |
| - run: vendor/bin/phpunit --coverage-clover=coverage.xml |
| 74 | + - name: Run tests |
| 75 | + run: vendor/bin/phpunit --coverage-clover=build/coverage-report.xml |
87 | 76 |
|
88 |
| - - name: Run codecov |
| 77 | + - name: Upload code coverage |
89 | 78 | uses: codecov/codecov-action@v1
|
90 | 79 | with:
|
91 |
| - file: './coverage.xml' |
92 |
| - fail_ci_if_error: true |
| 80 | + file: build/coverage-report.xml |
93 | 81 |
|
94 | 82 | missing-optional-packages-tests:
|
95 | 83 | name: Tests without optional packages
|
|
0 commit comments