Skip to content

Commit dd1e053

Browse files
authored
Merge pull request #197 from localheinz/fix/coverage
Fix: Collect and report code coverage
2 parents 7d73e66 + 3ba118b commit dd1e053

File tree

7 files changed

+166
-113
lines changed

7 files changed

+166
-113
lines changed

.github/workflows/continuous-integration.yml

Lines changed: 17 additions & 13 deletions
Original file line numberDiff line numberDiff line change
@@ -7,14 +7,14 @@ on:
77
- "push"
88

99
jobs:
10-
10+
1111
init-php-doc:
1212
name: "Init the php documentation cache"
1313
runs-on: "ubuntu-latest"
1414
steps:
1515
- name: "Checkout"
1616
uses: "actions/[email protected]"
17-
17+
1818
- name: "Cache PHP documentation checked out with svn"
1919
id: cache-svn
2020
uses: "actions/[email protected]"
@@ -26,7 +26,7 @@ jobs:
2626
if: steps.cache-svn.outputs.cache-hit != 'true'
2727
run: svn co https://svn.php.net/repository/phpdoc/modules/doc-en doc-en
2828
working-directory: "generator/doc"
29-
29+
3030
continuous-integration:
3131
name: "Continuous Integration"
3232

@@ -49,7 +49,7 @@ jobs:
4949
- name: "Install PHP with extensions"
5050
uses: "shivammathur/[email protected]"
5151
with:
52-
coverage: "none"
52+
coverage: "pcov"
5353
php-version: "${{ matrix.php-version }}"
5454

5555
- name: "Cache PHP documentation checked out with svn"
@@ -120,12 +120,16 @@ jobs:
120120
run: "composer install && composer rector && composer test"
121121
working-directory: "generator/tests/rector/0.6"
122122

123-
#- name: "Archive code coverage results"
124-
# uses: "actions/upload-artifact@v1"
125-
# with:
126-
# name: "build"
127-
# path: "generator/build"
128-
#
129-
#- name: "Upload test coverage to coveralls"
130-
# run: "php vendor/bin/php-coveralls -v"
131-
# working-directory: "generator"
123+
- name: "Archive code coverage results"
124+
uses: "actions/upload-artifact@v1"
125+
with:
126+
name: "build"
127+
path: "generator/build"
128+
129+
- name: "Upload test coverage to coveralls"
130+
continue-on-error: true
131+
run: "php vendor/bin/php-coveralls -v"
132+
working-directory: "generator"
133+
env:
134+
COVERALLS_REPO_TOKEN: ${{ secrets.COVERALLS_REPO_TOKEN }}
135+
COVERALLS_RUN_LOCALLY: 1

.gitignore

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -6,3 +6,4 @@
66
vendor/
77
/generator/tests/rector/0.5/composer.lock
88
/generator/tests/rector/0.6/composer.lock
9+
.phpunit.result.cache

generator/composer.json

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -7,15 +7,15 @@
77
}
88
},
99
"require": {
10-
"php": ">=7.1",
10+
"php": "^7.2",
1111
"ext-simplexml": "*",
1212
"ext-json": "^1.5",
1313
"symfony/console": "^4.1.4",
1414
"symfony/process": "^4.1",
1515
"symfony/finder": "^4.1"
1616
},
1717
"require-dev": {
18-
"phpunit/phpunit": "^7",
18+
"phpunit/phpunit": "^8.5.2",
1919
"phpstan/phpstan": "^0.12",
2020
"thecodingmachine/phpstan-strict-rules": "^0.12",
2121
"squizlabs/php_codesniffer": "^3.2",

0 commit comments

Comments
 (0)