[GHA] fix several codecov issues (#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
This commit is contained in:
kiukchung 2023-09-18 22:25:56 +00:00 committed by Francois Chollet
parent 1956e73245
commit 75dece378b
2 changed files with 36 additions and 31 deletions

@ -17,3 +17,39 @@ known_first_party = ["keras_core", "tests"]
default_section = "THIRDPARTY"
line_length = 80
extend_skip_glob=["examples/*", "guides/*"]
[tool.pytest.ini_options]
filterwarnings = [
"error",
"ignore::DeprecationWarning",
"ignore::ImportWarning",
"ignore::RuntimeWarning",
"ignore::PendingDeprecationWarning",
"ignore::FutureWarning",
"ignore::UserWarning",
# Ignore a spurious warning on tf-nightly related to save model changes.
"ignore:Custom mask layers require a config",
]
addopts = "-vv"
# Do not run tests in the `build` folders
norecursedirs = ["build"]
[tool.coverage.report]
exclude_lines = [
"pragma: no cover",
"@abstract",
"raise NotImplementedError",
]
omit = [
"*/*_test.py",
"keras_core/legacy/*",
]
[tool.coverage.run]
branch = true
omit = [
"*/*_test.py",
"keras_core/legacy/*",
]

@ -1,34 +1,3 @@
[tool:pytest]
filterwarnings =
error
ignore::DeprecationWarning
ignore::ImportWarning
ignore::RuntimeWarning
ignore::PendingDeprecationWarning
ignore::FutureWarning
ignore::UserWarning
# Ignore a spurious warning on tf-nightly related to save model changes.
ignore:Custom mask layers require a config
addopts=-vv
# Do not run tests in the `build` folders
norecursedirs = build
[coverage:report]
exclude_lines =
pragma: no cover
@abstract
raise NotImplementedError
omit =
*/*_test.py
[coverage:run]
omit =
*/*_test.py
branch = True
[flake8]
ignore =
# Conflicts with black