Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Remove link on badge #76

Merged
merged 4 commits into from Aug 9, 2022
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Jump to
Jump to file
Failed to load files.
Diff view
Diff view
11 changes: 8 additions & 3 deletions README.md
Expand Up @@ -9,10 +9,13 @@ The report is based on the coverage report generated by your test runner.
Note that this action does not run any tests, but expects the tests to have been run by another action already (support pytest only).

**Similar Action for Jest**
____

---

After I see that action become popular, I made similar action (even better) for javascript/typescript that runs `jest`
[jest-coverage-comment](https://github.com/marketplace/actions/jest-coverage-comment)
____

---

You can add this action to your GitHub workflow for Ubuntu runners (e.g. runs-on: ubuntu-latest) as follows:

Expand Down Expand Up @@ -40,8 +43,9 @@ 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 usefull when generate "coverageHtml", it points direct links to files on this branch (instead of commit).<br/>Usually "main" or "master". |
| `default-branch` | | `main` | This branch name is usefull 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.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 |

## Output Variables

Expand Down Expand Up @@ -161,6 +165,7 @@ Example GitHub Action workflow that passes all params to Pytest Coverage Comment
create-new-comment: false
hide-comment: false
report-only-changed-files: false
remove-link-from-badge: false
junitxml-path: ./path-to-file/pytest.xml
junitxml-title: My JUnit Xml Summary Title
```
Expand Down
5 changes: 5 additions & 0 deletions action.yml
Expand Up @@ -80,6 +80,11 @@ inputs:
default: ''
required: false

remove-link-from-badge:
description: 'When true, it will remove the link from badge to readme'
default: 'false'
required: false

outputs:
coverage:
description: 'value indicating the coverage percentage of your report based on pytest, example 30%'
Expand Down