diff --git a/.github/workflows/test.yml b/.github/workflows/test.yml index 4c3c6bfa..f68b3d1b 100644 --- a/.github/workflows/test.yml +++ b/.github/workflows/test.yml @@ -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: | diff --git a/README.md b/README.md index 8cf106c1..bf5bd74c 100644 --- a/README.md +++ b/README.md @@ -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: ``` diff --git a/main.py b/main.py index cdfde699..39bf3548 100644 --- a/main.py +++ b/main.py @@ -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)