From 512cc97f32c43ae053204a1bf0e2681e16ce2ec3 Mon Sep 17 00:00:00 2001 From: Richard Preen Date: Mon, 3 Jun 2024 22:49:45 +0100 Subject: [PATCH] fix codecov reporting --- .github/workflows/test.yml | 19 +++++++++++-------- setup.cfg | 4 ++++ 2 files changed, 15 insertions(+), 8 deletions(-) diff --git a/.github/workflows/test.yml b/.github/workflows/test.yml index 05e9988..1ee6b17 100644 --- a/.github/workflows/test.yml +++ b/.github/workflows/test.yml @@ -15,16 +15,19 @@ jobs: - name: Checkout uses: actions/checkout@v4 - - name: Install dependencies + - name: Install run: | - python -m pip install --upgrade pip - pip install pylint pytest pytest-cov - if [ -f requirements.txt ]; then pip install -r requirements.txt; fi + pip install --upgrade pip + pip install .[test] - - name: pytest and report coverage + - name: Generate coverage report run: | pytest --cov=./ --cov-report=xml - curl -Os https://uploader.codecov.io/latest/linux/codecov - chmod +x codecov - ./codecov + + - name: Upload coverage to Codecov + uses: codecov/codecov-action@v4 + with: + fail_ci_if_error: true + token: ${{ secrets.CODECOV_TOKEN }} + verbose: true ... diff --git a/setup.cfg b/setup.cfg index 77a2ff1..49aea06 100644 --- a/setup.cfg +++ b/setup.cfg @@ -64,6 +64,10 @@ doc = sphinx-rtd-theme==1.0.0 statsmodels==0.13.2 +test = + pytest + pytest-cov + [options.package_data] acro = default.yaml