diff --git a/.github/workflows/actions.yml b/.github/workflows/actions.yml index d92cfddd8..73d00eea9 100644 --- a/.github/workflows/actions.yml +++ b/.github/workflows/actions.yml @@ -46,10 +46,12 @@ jobs: - name: Test applications with pytest if: ${{ steps.filter.outputs.applications == 'true' }} run: | - pytest keras_core/applications + pytest keras_core/applications --cov=keras_core.applications --cov-branch --cov-report xml:apps-coverage.xml - name: Test with pytest run: | - pytest keras_core --ignore keras_core/applications + pytest keras_core --ignore keras_core/applications --cov-branch --cov=keras_core --cov-report xml:core-coverage.xml + - name: Codecov + uses: codecov/codecov-action@v3 format: name: Check the code format diff --git a/.gitignore b/.gitignore index af31f64ae..8bf2f2cf8 100644 --- a/.gitignore +++ b/.gitignore @@ -16,4 +16,6 @@ dist/** *.egg-info/* .vscode examples/**/*.jpg -.python-version \ No newline at end of file +.python-version +.coverage +coverage.xml \ No newline at end of file diff --git a/codecov.yml b/codecov.yml new file mode 100644 index 000000000..a785db3cc --- /dev/null +++ b/codecov.yml @@ -0,0 +1,12 @@ +coverage: + status: + project: + default: + # `auto` compares coverage with the base-commit + target: auto + + patch: + default: + target:auto + + diff --git a/pyproject.toml b/pyproject.toml index dc43bc695..e1350f59b 100644 --- a/pyproject.toml +++ b/pyproject.toml @@ -9,6 +9,7 @@ extend-exclude = """ examples/ ) """ + [tool.isort] profile = "black" force_single_line = "True"