Skip to content

Commit

Permalink
[FEA] Add test coverage reporting to CI/CD pipeline
Browse files Browse the repository at this point in the history
* Update GitHub Actions workflow to run tests with coverage
  - Install pytest and pytest-cov dependencies
  - Run pytest with --cov flag to collect coverage data for commitai package
* Generate coverage report after running tests
  - Use 'coverage report' command to output coverage metrics

This enhancement adds test coverage reporting to the existing CI/CD pipeline. By integrating coverage data collection and reporting, we can monitor the code coverage of the commitai package and ensure that the tests adequately exercise the codebase. This helps maintain code quality and identifies areas that may require additional testing.

Co-authored-by: Comai <github.com/lguibr/comai>
  • Loading branch information
lguibr committed Mar 19, 2024
1 parent 11ce52e commit 40d4077
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion .github/workflows/main.yml
Original file line number Diff line number Diff line change
Expand Up @@ -57,7 +57,7 @@ jobs:
pip install pytest pytest-cov
- name: Run tests with coverage
run: |
pytest --cov=commitai ./commitai
pytest --cov=commitai ./commitai/test
- name: Generate coverage report
run: |
coverage report -m
Expand Down

0 comments on commit 40d4077

Please sign in to comment.