Skip to content

Commit a5d1ffe

Browse files
committed
ci: migrate codecov to use components and flags
1 parent a5789cf commit a5d1ffe

File tree

3 files changed

+48
-22
lines changed

3 files changed

+48
-22
lines changed

.github/workflows/pythonapp.yml

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -51,3 +51,4 @@ jobs:
5151
name: build-${{ matrix.python-ver }}
5252
fail_ci_if_error: true
5353
token: ${{ secrets.CODECOV_TOKEN }}
54+
flags: unittests

codecov.yml

Lines changed: 45 additions & 21 deletions
Original file line numberDiff line numberDiff line change
@@ -1,28 +1,52 @@
11
comment:
22
require_changes: true
3+
34
coverage:
45
status:
56
patch:
67
default: false
7-
tests:
8-
target: 100%
9-
paths:
10-
- tests/
11-
core:
12-
paths:
13-
- cloudbot/
14-
target: 100%
15-
plugins:
16-
paths:
17-
- plugins/
188
project:
19-
tests:
20-
target: 100%
21-
paths:
22-
- tests/
23-
core:
24-
paths:
25-
- cloudbot/
26-
plugins:
27-
paths:
28-
- plugins/
9+
default: false
10+
11+
component_management:
12+
individual_components:
13+
- component_id: types
14+
name: types
15+
flag_regexes:
16+
- types
17+
statuses:
18+
- type: patch
19+
target: 90%
20+
21+
- component_id: tests
22+
name: tests
23+
flag_regexes:
24+
- unittests
25+
paths:
26+
- tests/
27+
statuses:
28+
- type: patch
29+
target: 100%
30+
- type: project
31+
target: 100%
32+
33+
- component_id: core
34+
name: core
35+
flag_regexes:
36+
- unittests
37+
paths:
38+
- cloudbot/
39+
statuses:
40+
- type: patch
41+
target: 100%
42+
- type: project
43+
44+
- component_id: plugins
45+
name: plugins
46+
flag_regexes:
47+
- unittests
48+
paths:
49+
- plugins/
50+
statuses:
51+
- type: patch
52+
- type: project

tests/plugin_tests/test_chan_log.py

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,4 @@
1+
import sys
12
from itertools import chain
23

34
from plugins.core import chan_log
@@ -6,7 +7,7 @@
67
def test_format_exception_chain():
78
def _get_data(exc):
89
yield repr(exc)
9-
if hasattr(exc, "add_note"):
10+
if sys.version_info >= (3, 11):
1011
yield f" add_note = {exc.add_note!r}"
1112

1213
yield f" args = {exc.args!r}"

0 commit comments

Comments
 (0)