From 33acc6d2923faac97871d5e5a5f6eb2a36445083 Mon Sep 17 00:00:00 2001 From: lucianopaz Date: Wed, 15 Feb 2023 14:33:51 +0100 Subject: [PATCH] Add codecov --- .github/workflows/ci.yml | 10 ++++++++-- README.md | 1 + codecov.yml | 16 ++++++++++++++++ 3 files changed, 25 insertions(+), 2 deletions(-) create mode 100644 codecov.yml diff --git a/.github/workflows/ci.yml b/.github/workflows/ci.yml index bfa1e8e6..8e8295ea 100644 --- a/.github/workflows/ci.yml +++ b/.github/workflows/ci.yml @@ -36,5 +36,11 @@ jobs: python-version: ${{ matrix.python-version }} - name: Run tests run: | - make init - make test + pip install -e .[test] + pytest --cov-report=xml --no-cov-on-fail + - name: Upload coverage to Codecov + uses: codecov/codecov-action@v3 + with: + token: ${{ secrets.CODECOV_TOKEN }} # use token for more robust uploads + name: ${{ matrix.python-version }} + fail_ci_if_error: false diff --git a/README.md b/README.md index 09fe899b..06d1513a 100644 --- a/README.md +++ b/README.md @@ -7,6 +7,7 @@ ![Read the Docs](https://img.shields.io/readthedocs/causalpy) ![PyPI - Downloads](https://img.shields.io/pypi/dm/causalpy) ![Interrogate](img/interrogate_badge.svg) +[![codecov](https://codecov.io/gh/pymc-labs/CausalPy/branch/main/graph/badge.svg?token=FDKNAY5CZ9)](https://codecov.io/gh/pymc-labs/CausalPy) A Python package focussing on causal inference in quasi-experimental settings. The package allows for sophisticated Bayesian model fitting methods to be used in addition to traditional OLS. diff --git a/codecov.yml b/codecov.yml new file mode 100644 index 00000000..53034848 --- /dev/null +++ b/codecov.yml @@ -0,0 +1,16 @@ +coverage: + status: + project: + default: + # basic + target: auto + threshold: 2% + base: auto + paths: + - "causalpy/" + # advanced settings + branches: + - main + if_ci_failed: error #success, failure, error, ignore + informational: false + only_pulls: false \ No newline at end of file