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