Skip to content

Commit 93a062e

Browse files
authored
Merge pull request #458 from RocketPy-Team/mnt/add-codecov-integration
MNT: add codecov integration
2 parents cf6f977 + 7934beb commit 93a062e

File tree

2 files changed

+17
-2
lines changed

2 files changed

+17
-2
lines changed

.github/workflows/test_pytest.yaml

Lines changed: 16 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -25,6 +25,9 @@ jobs:
2525
python-version:
2626
- 3.8
2727
- 3.12
28+
env:
29+
OS: ${{ matrix.os }}
30+
PYTHON: ${{ matrix.python-version }}
2831
steps:
2932
- uses: actions/checkout@v2
3033
- name: Set up Python ${{ matrix.python-version }}
@@ -45,6 +48,17 @@ jobs:
4548
pip install -r requirements-tests.txt
4649
- name: Test with pytest
4750
run: |
48-
pytest
51+
pytest --cov=rocketpy --cov-report=xml
4952
cd rocketpy
50-
pytest --doctest-modules
53+
pytest --doctest-modules --cov=rocketpy --cov-report=xml
54+
- name: Upload coverage report to Codecov
55+
uses: codecov/codecov-action@v3
56+
with:
57+
token: ${{ secrets.CODECOV_TOKEN }}
58+
directory: ./coverage/reports/
59+
env_vars: OS,PYTHON
60+
fail_ci_if_error: true
61+
files: ./coverage.xml, ./rocketpy/coverage.xml
62+
flags: unittests
63+
name: codecov-umbrella
64+
verbose: true

README.md

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -9,6 +9,7 @@
99
[![Open In Colab](https://colab.research.google.com/assets/colab-badge.svg)](https://colab.research.google.com/github/RocketPy-Team/rocketpy/blob/master/docs/notebooks/getting_started_colab.ipynb)
1010
[![PyPI](https://img.shields.io/pypi/v/rocketpy?color=g)](https://pypi.org/project/rocketpy/)
1111
[![Documentation Status](https://readthedocs.org/projects/rocketpyalpha/badge/?version=latest)](https://docs.rocketpy.org/en/latest/?badge=latest)
12+
[![codecov](https://codecov.io/gh/RocketPy-Team/RocketPy/graph/badge.svg?token=Ecc3bsHFeP)](https://codecov.io/gh/RocketPy-Team/RocketPy)
1213
[![Contributors](https://img.shields.io/github/contributors/RocketPy-Team/rocketpy)](https://github.com/RocketPy-Team/RocketPy/graphs/contributors)
1314
[![Chat on Discord](https://img.shields.io/discord/765037887016140840?logo=discord)](https://discord.gg/b6xYnNh)
1415
[![Sponsor RocketPy](https://img.shields.io/static/v1?label=Sponsor&message=%E2%9D%A4&logo=GitHub&color=%23fe8e86)](https://github.com/sponsors/RocketPy-Team)

0 commit comments

Comments
 (0)