Skip to content

Commit 7dcba94

Browse files
committed
test cov
1 parent 95fa349 commit 7dcba94

File tree

1 file changed

+8
-4
lines changed

1 file changed

+8
-4
lines changed

.github/workflows/ci.yml

Lines changed: 8 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -126,9 +126,9 @@ jobs:
126126
path: ${{ steps.composercache.outputs.dir }}
127127
key: ${{ runner.os }}-composer-${{ hashFiles('**/composer.json') }}
128128
restore-keys: ${{ runner.os }}-composer-
129-
# - name: Enable code coverage
130-
# if: matrix.coverage
131-
# run: echo "COVERAGE=1" >> $GITHUB_ENV
129+
- name: Enable code coverage
130+
if: matrix.coverage
131+
run: echo "COVERAGE=1" >> $GITHUB_ENV
132132
- name: Remove Doctrine MongoDB ODM
133133
if: (startsWith(matrix.php, '7.1'))
134134
run: |
@@ -147,7 +147,11 @@ jobs:
147147
- name: Run PHPUnit tests
148148
run: |
149149
mkdir -p build/logs/phpunit
150-
vendor/bin/simple-phpunit --log-junit build/logs/phpunit/junit.xml
150+
if [ "$COVERAGE" = '1' ]; then
151+
vendor/bin/simple-phpunit --coverage-clover build/logs/phpunit/clover.xml --log-junit build/logs/phpunit/junit.xml
152+
else
153+
vendor/bin/simple-phpunit --log-junit build/logs/phpunit/junit.xml
154+
fi
151155
# - name: Upload test artifacts
152156
# if: always()
153157
# uses: actions/upload-artifact@v1

0 commit comments

Comments
 (0)