|
9 | 9 | branches: |
10 | 10 | - "*.x" |
11 | 11 |
|
12 | | -env: |
13 | | - fail-fast: true |
14 | | - |
15 | 12 | jobs: |
16 | 13 | phpunit: |
17 | 14 | name: "PHPUnit" |
18 | | - runs-on: "ubuntu-20.04" |
19 | | - |
20 | | - strategy: |
21 | | - matrix: |
22 | | - php-version: |
23 | | - - "7.1" |
24 | | - - "7.2" |
25 | | - - "7.3" |
26 | | - - "7.4" |
27 | | - dependencies: |
28 | | - - "highest" |
29 | | - stability: |
30 | | - - "stable" |
31 | | - include: |
32 | | - - dependencies: "lowest" |
33 | | - php-version: "7.1" |
34 | | - - stability: "dev" |
35 | | - php-version: "8.0" |
36 | | - |
37 | | - steps: |
38 | | - - name: "Checkout" |
39 | | - uses: "actions/checkout@v2" |
40 | | - with: |
41 | | - fetch-depth: 2 |
42 | | - |
43 | | - - name: "Install PHP with PCOV" |
44 | | - uses: "shivammathur/setup-php@v2" |
45 | | - if: "${{ matrix.php-version != '7.1' }}" |
46 | | - with: |
47 | | - php-version: "${{ matrix.php-version }}" |
48 | | - coverage: "pcov" |
49 | | - ini-values: "zend.assertions=1" |
50 | | - |
51 | | - - name: "Install PHP with XDebug" |
52 | | - uses: "shivammathur/setup-php@v2" |
53 | | - if: "${{ matrix.php-version == '7.1' }}" |
54 | | - with: |
55 | | - php-version: "${{ matrix.php-version }}" |
56 | | - coverage: "xdebug" |
57 | | - ini-values: "zend.assertions=1" |
58 | | - |
59 | | - - name: "Allow installing dev dependencies" |
60 | | - run: "composer config minimum-stability dev" |
61 | | - if: "${{ matrix.stability == 'dev' }}" |
62 | | - |
63 | | - - name: "Install dependencies with Composer" |
64 | | - uses: "ramsey/composer-install@v1" |
65 | | - with: |
66 | | - dependency-versions: "${{ matrix.dependencies }}" |
67 | | - composer-options: "--prefer-dist" |
68 | | - |
69 | | - - name: "Run PHPUnit" |
70 | | - run: "vendor/bin/phpunit --coverage-clover=coverage.xml" |
71 | | - |
72 | | - - name: "Upload coverage file" |
73 | | - uses: "actions/upload-artifact@v2" |
74 | | - with: |
75 | | - name: "phpunit-${{ matrix.deps }}-${{ matrix.php-version }}.coverage" |
76 | | - path: "coverage.xml" |
77 | | - |
78 | | - upload_coverage: |
79 | | - name: "Upload coverage to Codecov" |
80 | | - runs-on: "ubuntu-20.04" |
81 | | - needs: |
82 | | - - "phpunit" |
83 | | - |
84 | | - steps: |
85 | | - - name: "Checkout" |
86 | | - uses: "actions/checkout@v2" |
87 | | - with: |
88 | | - fetch-depth: 2 |
89 | | - |
90 | | - - name: "Download coverage files" |
91 | | - uses: "actions/download-artifact@v2" |
92 | | - with: |
93 | | - path: "reports" |
94 | | - |
95 | | - - name: "Upload to Codecov" |
96 | | - uses: "codecov/codecov-action@v1" |
97 | | - with: |
98 | | - directory: reports |
| 15 | + uses: "doctrine/.github/.github/workflows/[email protected]" |
| 16 | + with: |
| 17 | + php-versions: '["7.1", "7.2", "7.3", "7.4", "8.0"]' |
0 commit comments