Skip to content

Commit d5651d2

Browse files
committed
Fix
1 parent bb8691b commit d5651d2

File tree

2 files changed

+38
-22
lines changed

2 files changed

+38
-22
lines changed

.github/workflows/CI.yml

Lines changed: 31 additions & 15 deletions
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,30 @@ jobs:
8989
symfony/routing:^${{ matrix.symfony-version }} \
9090
&& make build
9191
92-
- name: Test
93-
run: make test-unit && make test-functional
92+
- name: Unit tests
93+
run: make test-unit
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+
104+
- name: Functional tests
105+
run: make test-functional
106+
107+
- name: DEBUG
108+
run: ls -ail build/coverage-phpunit/clover-functional.xml build/coverage-behat/clover.xml
109+
110+
- name: Upload functional tests coverage to codecov
104111
uses: codecov/codecov-action@v2
105112
with:
106-
file: "build/coverage/clover-functional.xml,build/behat-coverage/clover.xml"
113+
file: "build/coverage-phpunit/clover-functional.xml,build/coverage-behat/clover.xml"
107114
name: "functional-tests-${{ matrix.php-version }}-${{ matrix.symfony-version }}"
108-
flags: "functional-tests,php-${{ matrix.php-version }},sf-^${{ matrix.symfony-version }}"
115+
flags: "functional-tests,php-${{ matrix.php-version }},sf-${{ matrix.symfony-version }}"
109116
fail_ci_if_error: true
110117

111118
nightly-tests:
@@ -138,6 +145,7 @@ jobs:
138145
update: true
139146

140147
- name: Setup cache
148+
continue-on-error: true
141149
id: cache
142150
uses: actions/cache@v2
143151
with:
@@ -148,6 +156,7 @@ jobs:
148156
key: ${{ env.CACHE_VERSION }}-tests-${{ matrix.php-version }}-${{ matrix.symfony-version }}-${{ hashFiles('composer.json') }}
149157

150158
- name: Build
159+
continue-on-error: true
151160
run: |
152161
composer require \
153162
symfony/http-foundation:^${{ matrix.symfony-version }} \
@@ -158,21 +167,28 @@ jobs:
158167
symfony/routing:^${{ matrix.symfony-version }} \
159168
&& make build
160169
161-
- name: Test
162-
run: make test-unit && make test-functional
170+
- name: Unit tests
171+
continue-on-error: true
172+
run: make test-unit
163173

164174
# See the reports at https://codecov.io/gh/yoanm/symfony-jsonrpc-http-server
165175
- name: Upload unit tests coverage to codecov
166176
uses: codecov/codecov-action@v2
177+
continue-on-error: true
167178
with:
168-
file: "build/coverage/clover-unit.xml"
179+
file: "build/coverage-phpunit/clover-unit.xml"
169180
name: "unit-tests-${{ matrix.php-version }}-${{ matrix.symfony-version }}"
170-
flags: "unit-tests,php-${{ matrix.php-version }},sf-^${{ matrix.symfony-version }}"
181+
flags: "nightly,unit-tests,php-${{ matrix.php-version }},sf-${{ matrix.symfony-version }}"
171182
fail_ci_if_error: false
172-
- name: Upload unit tests coverage to codecov
183+
184+
- name: Functional tests
185+
run: make test-functional
186+
187+
- name: Upload functional tests coverage to codecov
173188
uses: codecov/codecov-action@v2
189+
continue-on-error: true
174190
with:
175-
file: "build/coverage/clover-functional.xml,build/behat-coverage/clover.xml"
191+
file: "build/coverage-phpunit/clover-functional.xml,build/coverage-behat/clover.xml"
176192
name: "functional-tests-${{ matrix.php-version }}-${{ matrix.symfony-version }}"
177-
flags: "functional-tests,php-${{ matrix.php-version }},sf-^${{ matrix.symfony-version }}"
193+
flags: "nightly,functional-tests,php-${{ matrix.php-version }},sf-${{ matrix.symfony-version }}"
178194
fail_ci_if_error: false

Makefile

Lines changed: 7 additions & 7 deletions
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)