Skip to content

Commit 7c98073

Browse files
committed
#21: updated php.yml
1 parent c545c80 commit 7c98073

File tree

2 files changed

+31
-3
lines changed

2 files changed

+31
-3
lines changed

.github/workflows/php.yml

Lines changed: 11 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -24,10 +24,18 @@ jobs:
2424
bootstrap: vendor/autoload.php
2525
configuration: phpunit.xml
2626
args: --coverage-text
27-
27+
2828
- name: Create PHPUnit coverage files
29-
run: ./vendor/bin/phpunit --coverage-clover coverage.xml
30-
run: bash <(curl -s https://codecov.io/bash)
29+
run: "vendor/bin/phpunit --coverage-clover=coverage.xml"
30+
- name: Upload coverage to Codecov
31+
uses: codecov/codecov-action@v1
32+
with:
33+
token: ${{ secrets.CODECOV_TOKEN }}
34+
file: ./coverage.xml
35+
flags: tests
36+
name: codecov-umbrella
37+
yml: ./codecov.yml
38+
fail_ci_if_error: true
3139

3240
- name: PHPStan analysis
3341
run: ./vendor/bin/phpstan analyse

codecov.yml

Lines changed: 20 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,20 @@
1+
codecov:
2+
require_ci_to_pass: yes
3+
4+
coverage:
5+
precision: 2
6+
round: down
7+
range: "70...100"
8+
9+
parsers:
10+
gcov:
11+
branch_detection:
12+
conditional: yes
13+
loop: yes
14+
method: no
15+
macro: no
16+
17+
comment:
18+
layout: "reach,diff,flags,files,footer"
19+
behavior: default
20+
require_changes: no

0 commit comments

Comments
 (0)