|
39 | 39 | - name: ComposerRequireChecker
|
40 | 40 | uses: docker://webfactory/composer-require-checker:3.2.0
|
41 | 41 |
|
42 |
| - unit-tests: |
43 |
| - name: Unit / PHP ${{ matrix.php-version }} |
| 42 | + tests: |
| 43 | + name: Tests / PHP ${{ matrix.php-version }} |
44 | 44 | runs-on: ubuntu-latest
|
45 | 45 | strategy:
|
46 | 46 | fail-fast: true
|
@@ -90,97 +90,39 @@ jobs:
|
90 | 90 | && make build
|
91 | 91 |
|
92 | 92 | - name: Test
|
93 |
| - run: make test-unit |
| 93 | + run: make test-unit && make test-functional |
94 | 94 |
|
95 |
| - # See the reports at https://codecov.io/gh/yoanm/php-jsonrpc-doc-sdk |
96 |
| - - name: Upload coverage to codecov |
| 95 | + # See the reports at https://codecov.io/gh/yoanm/symfony-jsonrpc-http-server |
| 96 | + - name: Upload unit tests coverage to codecov |
97 | 97 | uses: codecov/codecov-action@v2
|
98 | 98 | with:
|
| 99 | + file: "build/coverage/clover-unit.xml" |
99 | 100 | name: "unit-tests-${{ matrix.php-version }}-${{ matrix.symfony-version }}"
|
100 | 101 | flags: "unit-tests,php-${{ matrix.php-version }},sf-^${{ matrix.symfony-version }}"
|
101 | 102 | fail_ci_if_error: true
|
102 |
| - |
103 |
| - functional-tests: |
104 |
| - name: Functional / PHP ${{ matrix.php-version }} / Symfony ${{ matrix.symfony-version }} |
105 |
| - needs: [ unit-tests ] |
106 |
| - runs-on: ubuntu-latest |
107 |
| - strategy: |
108 |
| - fail-fast: true |
109 |
| - max-parallel: 4 |
110 |
| - matrix: |
111 |
| - php-version: |
112 |
| - - '7.2' |
113 |
| - - '7.4' |
114 |
| - - '8.0' |
115 |
| - - '8.1' |
116 |
| - symfony-version: |
117 |
| - - '4.4' |
118 |
| - - '5.4' |
119 |
| - steps: |
120 |
| - - name: Check out code |
121 |
| - uses: actions/checkout@v2 |
122 |
| - |
123 |
| - - name: Setup PHP |
124 |
| - uses: shivammathur/setup-php@v2 |
125 |
| - with: |
126 |
| - php-version: '${{ matrix.php-version }}' |
127 |
| - tools: composer |
128 |
| - coverage: xdebug |
129 |
| - env: |
130 |
| - # Always use latest available patch for the version |
131 |
| - update: true |
132 |
| - |
133 |
| - - name: Setup cache |
134 |
| - id: cache |
135 |
| - uses: actions/cache@v2 |
136 |
| - with: |
137 |
| - path: | |
138 |
| - ~/.composer |
139 |
| - ./vendor |
140 |
| - # Clear the cache if composer json (as composer.lock is in the repo) has been updated |
141 |
| - key: ${{ env.CACHE_VERSION }}-tests-${{ matrix.php-version }}-${{ matrix.symfony-version }}-${{ hashFiles('composer.json') }} |
142 |
| - |
143 |
| - - name: Build |
144 |
| - run: | |
145 |
| - composer require \ |
146 |
| - symfony/http-foundation:^${{ matrix.symfony-version }} \ |
147 |
| - symfony/http-kernel:^${{ matrix.symfony-version }} \ |
148 |
| - symfony/config:^${{ matrix.symfony-version }} \ |
149 |
| - symfony/dependency-injection:^${{ matrix.symfony-version }} \ |
150 |
| - symfony/event-dispatcher:^${{ matrix.symfony-version }} \ |
151 |
| - symfony/routing:^${{ matrix.symfony-version }} \ |
152 |
| - && make build |
153 |
| -
|
154 |
| - - name: Test |
155 |
| - run: make test-functional |
156 |
| - |
157 |
| - # See the reports at https://codecov.io/gh/yoanm/php-jsonrpc-doc-sdk |
158 |
| - - name: Upload coverage to codecov |
| 103 | + - name: Upload unit tests coverage to codecov |
159 | 104 | uses: codecov/codecov-action@v2
|
160 | 105 | with:
|
| 106 | + file: "build/coverage/clover-functional.xml,build/behat-coverage/clover.xml" |
161 | 107 | name: "functional-tests-${{ matrix.php-version }}-${{ matrix.symfony-version }}"
|
162 | 108 | flags: "functional-tests,php-${{ matrix.php-version }},sf-^${{ matrix.symfony-version }}"
|
163 | 109 | fail_ci_if_error: true
|
164 | 110 |
|
165 | 111 | nightly-tests:
|
166 | 112 | name: Nightly / PHP ${{ matrix.php-version }} / Symfony ${{ matrix.symfony-version }}
|
167 |
| - needs: [ functional-tests ] |
| 113 | + needs: [ tests ] |
168 | 114 | runs-on: ubuntu-latest
|
169 | 115 | env:
|
170 | 116 | COMPOSER_OPTIONS: '--optimize-autoloader --ignore-platform-req=php+' # Ignore upper PHP bound requirement
|
171 | 117 | strategy:
|
172 | 118 | fail-fast: false
|
173 | 119 | max-parallel: 2
|
174 | 120 | matrix:
|
175 |
| - exclude: |
176 |
| - - php-version: '8.1' # Already done above |
177 |
| - symfony-version: '5.4' |
178 | 121 | php-version:
|
179 |
| - - '8.1' |
180 | 122 | - '8.2'
|
181 | 123 | symfony-version:
|
| 124 | + - '4.4' |
182 | 125 | - '5.4'
|
183 |
| - - '6.2' |
184 | 126 | steps:
|
185 | 127 | - name: Check out code
|
186 | 128 | uses: actions/checkout@v2
|
@@ -217,12 +159,20 @@ jobs:
|
217 | 159 | && make build
|
218 | 160 |
|
219 | 161 | - name: Test
|
220 |
| - run: make test-functional |
| 162 | + run: make test-unit && make test-functional |
221 | 163 |
|
222 |
| - # See the reports at https://codecov.io/gh/yoanm/php-jsonrpc-doc-sdk |
223 |
| - - name: Upload coverage to codecov |
| 164 | + # See the reports at https://codecov.io/gh/yoanm/symfony-jsonrpc-http-server |
| 165 | + - name: Upload unit tests coverage to codecov |
224 | 166 | uses: codecov/codecov-action@v2
|
225 | 167 | with:
|
226 |
| - name: "nightly-tests-${{ matrix.php-version }}-${{ matrix.symfony-version }}" |
227 |
| - flags: "nightly-tests,php-${{ matrix.php-version }},sf-^${{ matrix.symfony-version }}" |
| 168 | + file: "build/coverage/clover-unit.xml" |
| 169 | + name: "unit-tests-${{ matrix.php-version }}-${{ matrix.symfony-version }}" |
| 170 | + flags: "unit-tests,php-${{ matrix.php-version }},sf-^${{ matrix.symfony-version }}" |
| 171 | + fail_ci_if_error: false |
| 172 | + - name: Upload unit tests coverage to codecov |
| 173 | + uses: codecov/codecov-action@v2 |
| 174 | + with: |
| 175 | + file: "build/coverage/clover-functional.xml,build/behat-coverage/clover.xml" |
| 176 | + name: "functional-tests-${{ matrix.php-version }}-${{ matrix.symfony-version }}" |
| 177 | + flags: "functional-tests,php-${{ matrix.php-version }},sf-^${{ matrix.symfony-version }}" |
228 | 178 | fail_ci_if_error: false
|
0 commit comments