Skip to content

Commit

Permalink
Skipping full covered files from xml (#187)
Browse files Browse the repository at this point in the history
* Add input for skipping full covered files from xml (#186)

* formatting xml-skip-covered related files

* 1.1.53

* Add option to skip fully covered lines based on xml report

* Update @actions/core to version 1.11.1

* Update devDependencies in package.json

* update changelog

* Update dependabot configuration to allow minor and patch updates for npm development and production dependencies

---------

Co-authored-by: Nikita Terentyev <[email protected]>
  • Loading branch information
MishaKav and NikTerentev authored Oct 10, 2024
1 parent e8eba13 commit 8188282
Show file tree
Hide file tree
Showing 11 changed files with 8,347 additions and 7,526 deletions.
11 changes: 11 additions & 0 deletions .github/dependabot.yml
Original file line number Diff line number Diff line change
Expand Up @@ -16,3 +16,14 @@ updates:
schedule:
interval: 'monthly'
day: 'saturday'
groups:
npm-development:
dependency-type: development
update-types:
- minor
- patch
npm-production:
dependency-type: production
update-types:
- minor
- patch
9 changes: 9 additions & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
@@ -1,5 +1,14 @@
# Changelog of the Pytest Coverage Comment

## [Pytest Coverage Comment 1.1.53](https://github.com/MishaKav/pytest-coverage-comment/tree/v1.1.53)

**Release Date:** 2024-10-10

#### Changes

- add option `xml-skip-covered` to skip lines that covered for 100% based on xml report, thanks to [@NikTerentev](https://github.com/NikTerentev) for contribution
- bump dev dependencies and minor for `@actions/core`

## [Pytest Coverage Comment 1.1.52](https://github.com/MishaKav/pytest-coverage-comment/tree/v1.1.52)

**Release Date:** 2024-06-30
Expand Down
5 changes: 3 additions & 2 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -32,7 +32,7 @@ You can add this action to your GitHub workflow for Ubuntu runners (e.g. runs-on
| Name | Required | Default | Description |
| --------------------------- | -------- | ----------------------- | ----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- |
| `github-token` | ✓ | `${{github.token}}` | An alternative GitHub token, other than the default provided by GitHub Actions runner |
| `issue-number` | | '' | PR Number where you'd like your comments to be posted to. Required to post a comment when running the workflow on an event that isn't `push` or `pull-request` . |
| `issue-number` | | '' | PR Number where you'd like your comments to be posted to. Required to post a comment when running the workflow on an event that isn't `push` or `pull-request` . |
| `pytest-coverage-path` | | `./pytest-coverage.txt` | The location of the txt output of pytest-coverage. Used to determine coverage percentage |
| `pytest-xml-coverage-path` | | '' | The location of coverage-xml from pytest-coverage (--cov-report "xml:coverage.xml) |
| `coverage-path-prefix` | | '' | Prefix for path when link to files in comment |
Expand All @@ -45,7 +45,8 @@ You can add this action to your GitHub workflow for Ubuntu runners (e.g. runs-on
| `junitxml-title` | | '' | Title for summary for junitxml |
| `create-new-comment` | | false | When false, will update the same comment, otherwise will publish new comment on each run. |
| `hide-comment` | | false | Hide the whole comment (use when you need only the `output`). Useful for auto-update bagdes in readme. See the [workflow](../main/.github/workflows/live-test.yml) for example |
| `default-branch` | | `main` | This branch name is useful when generate "coverageHtml", it points direct links to files on this branch (instead of commit).<br/>Usually "main" or "master" |
| `xml-skip-covered` | | false | Hide files from xml report with 100% coverage |
| `default-branch` | | `main` | This branch name is useful when generate "coverageHtml", it points direct links to files on this branch (instead of commit).<br/>Usually "main" or "master" |
| `multiple-files` | | '' | You can pass array of titles and files to generate single comment with table of results.<br/>Single line should look like `Title, ./path/to/pytest-coverage.txt, ./path/to/pytest-junit.xml`<br/> example:<br/> `My Title 1, ./data/pytest-coverage_3.txt, ./data/pytest_1.xml`<br/>**Note:** In that mode the `output` for `coverage` and `color` will be for the first file only. |
| `remove-link-from-badge` | | false | When true, it will remove the link from badge to readme |
| `unique-id-for-comment` | | '' | When running in a matrix, pass the matrix value, so each comment will be updated its own comment `unique-id-for-comment: ${{ matrix.python-version }}` |
Expand Down
5 changes: 5 additions & 0 deletions action.yml
Original file line number Diff line number Diff line change
Expand Up @@ -56,6 +56,11 @@ inputs:
default: 'false'
required: false

xml-skip-covered:
description: 'Hide files from xml report with 100% coverage'
default: 'false'
required: false

report-only-changed-files:
description: 'Show in report only changed files for this commit, and not all files'
default: 'false'
Expand Down
Loading

0 comments on commit 8188282

Please sign in to comment.