Skip to content

Commit 17cbd6b

Browse files
committed
Fix
1 parent bb8691b commit 17cbd6b

File tree

2 files changed

+25
-20
lines changed

2 files changed

+25
-20
lines changed

.github/workflows/CI.yml

+18-13
Original file line numberDiff line numberDiff line change
@@ -40,7 +40,7 @@ jobs:
4040
uses: docker://webfactory/composer-require-checker:3.2.0
4141

4242
tests:
43-
name: Tests / PHP ${{ matrix.php-version }}
43+
name: Tests / PHP ${{ matrix.php-version }} / Symfony ${{ matrix.symfony-version }}
4444
runs-on: ubuntu-latest
4545
strategy:
4646
fail-fast: true
@@ -89,23 +89,23 @@ jobs:
8989
symfony/routing:^${{ matrix.symfony-version }} \
9090
&& make build
9191
92-
- name: Test
92+
- name: Tests
9393
run: make test-unit && make test-functional
9494

9595
# See the reports at https://codecov.io/gh/yoanm/symfony-jsonrpc-http-server
9696
- name: Upload unit tests coverage to codecov
9797
uses: codecov/codecov-action@v2
9898
with:
99-
file: "build/coverage/clover-unit.xml"
99+
file: "build/coverage-phpunit/clover-unit.xml"
100100
name: "unit-tests-${{ matrix.php-version }}-${{ matrix.symfony-version }}"
101-
flags: "unit-tests,php-${{ matrix.php-version }},sf-^${{ matrix.symfony-version }}"
101+
flags: "unit-tests,php-${{ matrix.php-version }},sf-${{ matrix.symfony-version }}+"
102102
fail_ci_if_error: true
103-
- name: Upload unit tests coverage to codecov
103+
move_coverage_to_trash: true
104+
- name: Upload functional tests coverage to codecov
104105
uses: codecov/codecov-action@v2
105106
with:
106-
file: "build/coverage/clover-functional.xml,build/behat-coverage/clover.xml"
107107
name: "functional-tests-${{ matrix.php-version }}-${{ matrix.symfony-version }}"
108-
flags: "functional-tests,php-${{ matrix.php-version }},sf-^${{ matrix.symfony-version }}"
108+
flags: "functional-tests,php-${{ matrix.php-version }},sf-${{ matrix.symfony-version }}+"
109109
fail_ci_if_error: true
110110

111111
nightly-tests:
@@ -138,6 +138,7 @@ jobs:
138138
update: true
139139

140140
- name: Setup cache
141+
continue-on-error: true
141142
id: cache
142143
uses: actions/cache@v2
143144
with:
@@ -148,6 +149,7 @@ jobs:
148149
key: ${{ env.CACHE_VERSION }}-tests-${{ matrix.php-version }}-${{ matrix.symfony-version }}-${{ hashFiles('composer.json') }}
149150

150151
- name: Build
152+
continue-on-error: true
151153
run: |
152154
composer require \
153155
symfony/http-foundation:^${{ matrix.symfony-version }} \
@@ -159,20 +161,23 @@ jobs:
159161
&& make build
160162
161163
- name: Test
164+
continue-on-error: true
162165
run: make test-unit && make test-functional
163166

164167
# See the reports at https://codecov.io/gh/yoanm/symfony-jsonrpc-http-server
165168
- name: Upload unit tests coverage to codecov
166169
uses: codecov/codecov-action@v2
170+
continue-on-error: true
167171
with:
168-
file: "build/coverage/clover-unit.xml"
172+
file: "build/coverage-phpunit/clover-unit.xml"
169173
name: "unit-tests-${{ matrix.php-version }}-${{ matrix.symfony-version }}"
170-
flags: "unit-tests,php-${{ matrix.php-version }},sf-^${{ matrix.symfony-version }}"
174+
flags: "nightly,unit-tests,php-${{ matrix.php-version }},sf-${{ matrix.symfony-version }}+"
171175
fail_ci_if_error: false
172-
- name: Upload unit tests coverage to codecov
176+
move_coverage_to_trash: true
177+
- name: Upload functional tests coverage to codecov
173178
uses: codecov/codecov-action@v2
174-
with:
175-
file: "build/coverage/clover-functional.xml,build/behat-coverage/clover.xml"
179+
continue-on-error: true
180+
file: "build/coverage-phpunit/clover-functional.xml,build/coverage-behat/clover.xml"
176181
name: "functional-tests-${{ matrix.php-version }}-${{ matrix.symfony-version }}"
177-
flags: "functional-tests,php-${{ matrix.php-version }},sf-^${{ matrix.symfony-version }}"
182+
flags: "nightly,functional-tests,php-${{ matrix.php-version }},sf-${{ matrix.symfony-version }}+"
178183
fail_ci_if_error: false

Makefile

+7-7
Original file line numberDiff line numberDiff line change
@@ -3,11 +3,11 @@ TEST_OUTPUT_STYLE ?= dot
33

44
## DIRECTORY AND FILE
55
BUILD_DIRECTORY ?= build
6-
REPORTS_DIRECTORY ?= ${BUILD_DIRECTORY}/reports
7-
COVERAGE_DIRECTORY ?= ${BUILD_DIRECTORY}/coverage
6+
REPORTS_DIRECTORY ?= ${BUILD_DIRECTORY}/reports # Codestyle
87
BEHAT_COVERAGE_DIRECTORY ?= ${BUILD_DIRECTORY}/coverage-behat
9-
PHPUNIT_UNIT_COVERAGE_FILE_PATH ?= ${COVERAGE_DIRECTORY}/clover-unit.xml
10-
PHPUNIT_FUNCTIONAL_COVERAGE_FILE_PATH ?= ${COVERAGE_DIRECTORY}/clover-functional.xml
8+
PHPUNIT_COVERAGE_DIRECTORY ?= ${BUILD_DIRECTORY}/coverage-phpunit
9+
PHPUNIT_UNIT_COVERAGE_FILE_PATH ?= ${PHPUNIT_COVERAGE_DIRECTORY}/clover-unit.xml
10+
PHPUNIT_FUNCTIONAL_COVERAGE_FILE_PATH ?= ${PHPUNIT_COVERAGE_DIRECTORY}/clover-functional.xml
1111

1212
## Commands options
1313
### Composer
@@ -42,8 +42,8 @@ endif
4242
ifdef COVERAGE_OUTPUT_STYLE
4343
export XDEBUG_MODE=coverage
4444
ifeq ("${COVERAGE_OUTPUT_STYLE}","html")
45-
PHPUNIT_COVERAGE_OPTION ?= --coverage-html ${COVERAGE_DIRECTORY}
46-
PHPUNIT_FUNCTIONAL_COVERAGE_OPTION ?= --coverage-html ${COVERAGE_DIRECTORY}
45+
PHPUNIT_COVERAGE_OPTION ?= --coverage-html ${PHPUNIT_COVERAGE_DIRECTORY}
46+
PHPUNIT_FUNCTIONAL_COVERAGE_OPTION ?= --coverage-html ${PHPUNIT_COVERAGE_DIRECTORY}
4747
BEHAT_COVERAGE_OPTION ?= --profile coverage-html
4848
else ifeq ("${COVERAGE_OUTPUT_STYLE}","clover")
4949
PHPUNIT_COVERAGE_OPTION ?= --coverage-clover ${PHPUNIT_UNIT_COVERAGE_FILE_PATH}
@@ -107,7 +107,7 @@ scrutinizer-behat:
107107

108108
# Internal commands
109109
create-build-directories:
110-
mkdir -p ${COVERAGE_DIRECTORY} ${BEHAT_COVERAGE_DIRECTORY} ${REPORTS_DIRECTORY} ${REPORTS_DIRECTORY}
110+
mkdir -p ${PHPUNIT_COVERAGE_DIRECTORY} ${BEHAT_COVERAGE_DIRECTORY} ${REPORTS_DIRECTORY}
111111

112112
.PHONY: build install configure test test-unit test-functional codestyle create-build-directories scrutinizer-behat scrutinizer-phpunit
113113
.DEFAULT: build

0 commit comments

Comments
 (0)