Skip to content

Commit 8810e2b

Browse files
authored
Merge pull request #18 from faissaloux/test-coverage
Show tests coverage
2 parents fc6a664 + 371a98c commit 8810e2b

File tree

3 files changed

+14
-4
lines changed

3 files changed

+14
-4
lines changed

Diff for: .github/workflows/tests.yml

+9-2
Original file line numberDiff line numberDiff line change
@@ -22,10 +22,17 @@ jobs:
2222
with:
2323
php-version: ${{ matrix.php }}
2424
tools: composer:v2
25-
coverage: none
25+
coverage: xdebug
2626

2727
- name: Install PHP dependencies
2828
run: composer update --${{ matrix.dependency-version }} --no-interaction --no-progress --ansi
2929

3030
- name: Unit Tests
31-
run: composer test:unit
31+
run: composer test:unit -- --coverage-clover ./coverage.xml
32+
33+
- name: Upload coverage reports to Codecov
34+
uses: codecov/[email protected]
35+
with:
36+
token: ${{ secrets.CODECOV_TOKEN }}
37+
files: ./coverage.xml
38+
verbose: true

Diff for: README.md

+1-1
Original file line numberDiff line numberDiff line change
@@ -3,7 +3,7 @@
33
This plugin afford math related expectations.
44

55

6-
[![Tests](https://github.com/faissaloux/pest-plugin-math/actions/workflows/tests.yml/badge.svg)](https://github.com/faissaloux/pest-plugin-math/actions/workflows/tests.yml) ![Packagist Version](https://img.shields.io/packagist/v/faissaloux/pest-plugin-math) ![Packagist License](https://img.shields.io/packagist/l/faissaloux/pest-plugin-math)
6+
[![Tests](https://github.com/faissaloux/pest-plugin-math/actions/workflows/tests.yml/badge.svg)](https://github.com/faissaloux/pest-plugin-math/actions/workflows/tests.yml) ![Codecov](https://img.shields.io/codecov/c/github/faissaloux/pest-plugin-math) ![Packagist Version](https://img.shields.io/packagist/v/faissaloux/pest-plugin-math) ![Packagist License](https://img.shields.io/packagist/l/faissaloux/pest-plugin-math)
77

88

99
#### `toBeDivisibleBy()`

Diff for: composer.json

+4-1
Original file line numberDiff line numberDiff line change
@@ -55,7 +55,10 @@
5555
"test:refactor": "rector --dry-run",
5656
"test:lint": "pint --test",
5757
"test:types": "phpstan analyse --ansi",
58-
"test:unit": "pest --colors=always",
58+
"test:unit": [
59+
"@putenv XDEBUG_MODE=coverage",
60+
"pest --coverage --colors=always -v"
61+
],
5962
"test": [
6063
"@test:refactor",
6164
"@test:lint",

0 commit comments

Comments
 (0)