Skip to content

Commit 75dece3

Browse files
kiukchungfchollet
authored andcommitted
[GHA] fix several codecov issues (keras-team#912)
* [ci/cd] exclude keras_core/legacy from coverage.run|report, add backend to codecov flags, move project config to pyproject.toml * GHA codecov upload, fail ci if error
1 parent 1956e73 commit 75dece3

File tree

2 files changed

+36
-31
lines changed

2 files changed

+36
-31
lines changed

pyproject.toml

+36
Original file line numberDiff line numberDiff line change
@@ -17,3 +17,39 @@ known_first_party = ["keras_core", "tests"]
1717
default_section = "THIRDPARTY"
1818
line_length = 80
1919
extend_skip_glob=["examples/*", "guides/*"]
20+
21+
[tool.pytest.ini_options]
22+
filterwarnings = [
23+
"error",
24+
"ignore::DeprecationWarning",
25+
"ignore::ImportWarning",
26+
"ignore::RuntimeWarning",
27+
"ignore::PendingDeprecationWarning",
28+
"ignore::FutureWarning",
29+
"ignore::UserWarning",
30+
# Ignore a spurious warning on tf-nightly related to save model changes.
31+
"ignore:Custom mask layers require a config",
32+
]
33+
addopts = "-vv"
34+
35+
# Do not run tests in the `build` folders
36+
norecursedirs = ["build"]
37+
38+
[tool.coverage.report]
39+
exclude_lines = [
40+
"pragma: no cover",
41+
"@abstract",
42+
"raise NotImplementedError",
43+
]
44+
omit = [
45+
"*/*_test.py",
46+
"keras_core/legacy/*",
47+
]
48+
49+
[tool.coverage.run]
50+
branch = true
51+
omit = [
52+
"*/*_test.py",
53+
"keras_core/legacy/*",
54+
]
55+

setup.cfg

-31
Original file line numberDiff line numberDiff line change
@@ -1,34 +1,3 @@
1-
[tool:pytest]
2-
filterwarnings =
3-
error
4-
ignore::DeprecationWarning
5-
ignore::ImportWarning
6-
ignore::RuntimeWarning
7-
ignore::PendingDeprecationWarning
8-
ignore::FutureWarning
9-
ignore::UserWarning
10-
# Ignore a spurious warning on tf-nightly related to save model changes.
11-
ignore:Custom mask layers require a config
12-
13-
addopts=-vv
14-
15-
# Do not run tests in the `build` folders
16-
norecursedirs = build
17-
18-
[coverage:report]
19-
exclude_lines =
20-
pragma: no cover
21-
@abstract
22-
raise NotImplementedError
23-
omit =
24-
*/*_test.py
25-
26-
[coverage:run]
27-
omit =
28-
*/*_test.py
29-
30-
branch = True
31-
321
[flake8]
332
ignore =
343
# Conflicts with black

0 commit comments

Comments
 (0)