10000 GitHub - chrislevn/test-codecov: test codecov
[go: up one dir, main page]
More Web Proxy on the site http://driver.im/
Skip to content

chrislevn/test-codecov

Repository files navigation

Test CodeCov Project

A simple Python project to demonstrate CodeCov integration.

codecov

Project Structure

  • mypackage/: Main package
    • calculator.py: A simple calculator module
    • tests/: Test directory
      • test_calculator.py: Tests for calculator module

Code Coverage

This project is set up with CodeCov to track code coverage. The configuration in .codecov.yml requires:

  • Project coverage target: 70%
  • Threshold: 10% (allows coverage to drop by up to 10% without failing)

Running Tests Locally

To run tests and generate coverage reports:

# Install dependencies
pip install -r requirements.txt

# Run tests with coverage
pytest

# The coverage report will be generated as coverage.xml

CI/CD

GitHub Actions is configured to:

  1. Run tests on every push to main and on pull requests
  2. Generate coverage reports
  3. Upload coverage data to CodeCov

Notes

  • Some functions in the calculator module are intentionally not tested to demonstrate partial code coverage
  • The CodeCov configuration ignores certain files (versioneer.py and monai/_version.py)

About

test codecov

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Languages

0