Skip to content

Commit

Permalink
- Fixed text line about test and coverage in README.md.
Browse files Browse the repository at this point in the history
- Reformat of cov-report output format definition.
  • Loading branch information
miroslavpojer committed Oct 16, 2024
1 parent 5eee2e9 commit 3f02bfd
Show file tree
Hide file tree
Showing 3 changed files with 6 additions and 4 deletions.
2 changes: 1 addition & 1 deletion .github/workflows/test.yml
Original file line number Diff line number Diff line change
Expand Up @@ -102,7 +102,7 @@ jobs:
run: echo "PYTHONPATH=${GITHUB_WORKSPACE}/release_notes_generator/release_notes_generator" >> $GITHUB_ENV

- name: Build and run unit tests
run: pytest --cov=release_notes_generator --cov-report html tests/ -vv
run: pytest --cov=release_notes_generator --cov-report=html tests/ -vv

- name: Check overall coverage
run: |
Expand Down
6 changes: 4 additions & 2 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -340,16 +340,18 @@ Unit tests are written using pytest. To run the tests, use the following command
pytest tests/
```

This will execute all tests located in the tests directory and generate a code coverage report.
This will execute all tests located in the tests directory.

## Code Coverage

Code coverage is collected using pytest-cov coverage tool. To run the tests and collect coverage information, use the following command:

```
pytest --cov=release_notes_generator --cov-report html tests/
pytest --cov=release_notes_generator --cov-report=html tests/
```

This will execute all tests located in the tests directory and generate a code coverage report.

See the coverage report on the path:

```
Expand Down
2 changes: 1 addition & 1 deletion main.py
Original file line number Diff line number Diff line change
Expand Up @@ -52,7 +52,7 @@ def run() -> None:

generator = ReleaseNotesGenerator(py_github, custom_chapters)
rls_notes = generator.generate()
logger.debug("Release notes: \n%s", rls_notes)
logger.debug("Generated release notes: \n%s", rls_notes)

# Set the output for the GitHub Action
set_action_output("release-notes", rls_notes)
Expand Down

0 comments on commit 3f02bfd

Please sign in to comment.