Skip to content

Commit

Permalink
Remove link on badge (#76)
Browse files Browse the repository at this point in the history
* bump packages

* add `remove-link-from-badge` to readme

* add removeLinkFromBadge to code

* 1.1.31
  • Loading branch information
MishaKav committed Aug 9, 2022
1 parent 9635d4f commit 7c2f420
Show file tree
Hide file tree
Showing 9 changed files with 4,371 additions and 2,254 deletions.
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

0 comments on commit 7c2f420

Please sign in to comment.