Skip to content

Commit 0765e45

Browse files
committed
add codecov support
1 parent b114bdd commit 0765e45

File tree

2 files changed

+44
-0
lines changed

2 files changed

+44
-0
lines changed

.github/codecov.yml

Lines changed: 37 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,37 @@
1+
codecov:
2+
branch: main
3+
require_ci_to_pass: yes
4+
5+
coverage:
6+
status:
7+
project:
8+
default:
9+
informational: true
10+
target: auto
11+
# this allows a 10% drop from the previous base commit coverage
12+
threshold: 20%
13+
patch:
14+
default:
15+
informational: true
16+
precision: 2
17+
round: up
18+
range: "40...80"
19+
20+
parsers:
21+
javascript:
22+
enable_partials: yes
23+
gcov:
24+
branch_detection:
25+
conditional: yes
26+
loop: yes
27+
method: no
28+
macro: no
29+
30+
comment:
31+
layout: "reach,diff,flags,files,footer"
32+
behavior: default
33+
require_changes: true
34+
35+
ignore:
36+
- "build/"
37+
- "tests/"

.github/workflows/run-tests.yml

Lines changed: 7 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -35,3 +35,10 @@ jobs:
3535

3636
- name: Execute tests
3737
run: ./vendor/bin/phpunit
38+
39+
- name: Upload coverage to Codecov
40+
uses: codecov/codecov-action@v1
41+
with:
42+
token: ${{ secrets.CODECOV_TOKEN }}
43+
files: ./build/log/clover.xml
44+

0 commit comments

Comments
 (0)