diff --git a/.github/workflows/ci.yml b/.github/workflows/ci.yml index 0bce60d5..b2b6db0e 100644 --- a/.github/workflows/ci.yml +++ b/.github/workflows/ci.yml @@ -15,6 +15,11 @@ jobs: - name: Run tests and collect coverage run: pytest --cov app - name: Upload coverage to Codecov - uses: codecov/codecov-action@v4-beta + uses: codecov/codecov-action@v3 + with: + url: https://codecov.cloud.remarkable.engineering + token: ${{ secrets.CODECOV_TOKEN }} + slug: naesheimas/example-python + verbose: true env: CODECOV_TOKEN: ${{ secrets.CODECOV_TOKEN }} diff --git a/README.md b/README.md index 4251cc84..daec4474 100644 --- a/README.md +++ b/README.md @@ -1,5 +1,5 @@ -# [Codecov](https://codecov.io) Python Example -[](https://app.codecov.io/github/codecov/example-python) +# Self-hosted [Codecov](https://codecov.cloud.remarkable.engineering) Python Example +[](https://codecov.cloud.remarkable.engineering/gh/naesheimAS/example-python) [](https://app.fossa.com/projects/git%2Bgithub.com%2Fcodecov%2Fexample-python?ref=badge_shield) This example repository shows how Codecov can be integrated with a simple python project. It uses **GitHub Actions** and **CircleCI** as CI/CD providers and **coverage** as the coverage provider. @@ -7,7 +7,7 @@ This example repository shows how Codecov can be integrated with a simple python For more information, please see the links below. ## Links -- [Quick Start](https://docs.codecov.com/docs/quick-start) +- [Quick Start](https://codecov.cloud.remarkable.engineering) - [GitHub Tutorial](https://docs.codecov.com/docs/github-tutorial) - [Community Boards](https://community.codecov.io) - [Support](https://codecov.io/support) diff --git a/app/calculator.py b/app/calculator.py index 8a976b25..53d5245b 100644 --- a/app/calculator.py +++ b/app/calculator.py @@ -1,5 +1,9 @@ class Calculator: - + def power(self, x,y): + if y >1: + return x * Calculator.power(self,x,y-1) + return x + def add(x, y): return x + y @@ -13,3 +17,11 @@ def divide(x, y): if y == 0: return 'Cannot divide by 0' return x * 1.0 / y + + +def main(): + cal = Calculator() + print(cal.power(2,3)) + +if __name__ == "__main__": + main() diff --git a/codecov.yml b/codecov.yml index 6f151f75..90edd731 100644 --- a/codecov.yml +++ b/codecov.yml @@ -4,3 +4,13 @@ profiling: comment: show_critical_paths: true + layout: "diff, flags, files" + +coverage: + status: + project: + default: + informational: true + patch: + default: + informational: true
Note: This service is not intended for secure transactions such as banking, social media, email, or purchasing. Use at your own risk. We assume no liability whatsoever for broken pages.
Alternative Proxies: