From 74ee9bbe4ed5af7b6aa5c8204b3ab3bb5642d085 Mon Sep 17 00:00:00 2001 From: Andrea Waltlova Date: Thu, 31 Oct 2024 13:05:25 +0100 Subject: [PATCH] Upload codecov in unit tests workflow Signed-off-by: Andrea Waltlova --- .github/workflows/codecov.yml | 40 -------------------------------- .github/workflows/unit-tests.yml | 11 +++++++++ 2 files changed, 11 insertions(+), 40 deletions(-) delete mode 100644 .github/workflows/codecov.yml diff --git a/.github/workflows/codecov.yml b/.github/workflows/codecov.yml deleted file mode 100644 index 09a723a..0000000 --- a/.github/workflows/codecov.yml +++ /dev/null @@ -1,40 +0,0 @@ -# Based on https://github.com/codecov/codecov-action?tab=readme-ov-file#example-workflowyml-with-codecov-action -name: Codecov -on: - push: - branches: [main] - pull_request: - branches: [main] -jobs: - run: - runs-on: ${{ matrix.os }} - strategy: - matrix: - os: [ubuntu-latest] - env: - OS: ${{ matrix.os }} - PYTHON: '3.9' - steps: - - uses: actions/checkout@main - - name: Setup Python - uses: actions/setup-python@main - with: - python-version: '3.9' - - name: Install dependencies - run: | - python -m pip install --upgrade pip - pip install -r requirements-dev.txt -r requirements.txt - continue-on-error: true - - name: Generate coverage report - run: | - pip install pytest-cov - pytest --cov=./ --cov-report=xml - - name: Upload coverage to Codecov - uses: codecov/codecov-action@v4 - with: - env_vars: OS,PYTHON - fail_ci_if_error: true - flags: unittests - name: codecov-umbrella - token: ${{ secrets.CODECOV_TOKEN }} - verbose: true diff --git a/.github/workflows/unit-tests.yml b/.github/workflows/unit-tests.yml index 2353397..52a2272 100644 --- a/.github/workflows/unit-tests.yml +++ b/.github/workflows/unit-tests.yml @@ -26,3 +26,14 @@ jobs: - name: Test with pytest run: | pytest -v + + - name: Upload coverage to Codecov + uses: codecov/codecov-action@v4 + with: + env_vars: OS,PYTHON + file: ./coverage.xml + fail_ci_if_error: true + flags: unittests + name: codecov-umbrella + token: ${{ secrets.CODECOV_TOKEN }} + verbose: true