-
-
Notifications
You must be signed in to change notification settings - Fork 60
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
* eslint update * add hide comment * update readme & version
- Loading branch information
Showing
9 changed files
with
71 additions
and
59 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -10,7 +10,7 @@ jobs: | |
|
||
- name: Pytest coverage comment | ||
id: coverageComment | ||
uses: MishaKav/[email protected].5 | ||
uses: MishaKav/[email protected].6 | ||
with: | ||
pytest-coverage-path: ./data/pytest-coverage_4.txt | ||
junitxml-path: ./data/pytest_1.xml | ||
|
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -8,7 +8,7 @@ jobs: | |
- uses: actions/checkout@v2 | ||
|
||
- name: Pytest coverage comment | ||
uses: MishaKav/[email protected].5 | ||
uses: MishaKav/[email protected].6 | ||
with: | ||
multiple-files: | | ||
My Title 1, ./data/pytest-coverage_3.txt, ./data/pytest_1.xml | ||
|
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -8,7 +8,7 @@ You can add this action to your GitHub workflow for Ubuntu runners (e.g. runs-on | |
|
||
```yaml | ||
- name: Pytest coverage comment | ||
uses: MishaKav/[email protected].5 | ||
uses: MishaKav/[email protected].6 | ||
with: | ||
pytest-coverage-path: ./pytest-coverage.txt | ||
junitxml-path: ./pytest.xml | ||
|
@@ -27,6 +27,7 @@ You can add this action to your GitHub workflow for Ubuntu runners (e.g. runs-on | |
| `junitxml-path` | | '' | The location of the junitxml path | | ||
| `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/main.yml) for example | | ||
| `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. | | ||
|
||
## Output example | ||
|
@@ -71,7 +72,7 @@ jobs: | |
pytest --junitxml=pytest.xml --cov=app tests/ | tee pytest-coverage.txt | ||
- name: Pytest coverage comment | ||
uses: MishaKav/[email protected].5 | ||
uses: MishaKav/[email protected].6 | ||
with: | ||
pytest-coverage-path: ./pytest-coverage.txt | ||
junitxml-path: ./pytest.xml | ||
|
@@ -82,7 +83,7 @@ Example GitHub Action workflow that uses coverage percentage as output (see the | |
```yaml | ||
- name: Pytest coverage comment | ||
id: coverageComment | ||
uses: MishaKav/[email protected].5 | ||
uses: MishaKav/[email protected].6 | ||
with: | ||
pytest-coverage-path: ./pytest-coverage.txt | ||
junitxml-path: ./pytest.xml | ||
|
@@ -97,14 +98,15 @@ Example GitHub Action workflow that passes all params to Pytest Coverage Comment | |
|
||
```yaml | ||
- name: Pytest coverage comment | ||
uses: MishaKav/[email protected].5 | ||
uses: MishaKav/[email protected].6 | ||
with: | ||
pytest-coverage-path: ./path-to-file/pytest-coverage.txt | ||
title: My Coverage Report Title | ||
badge-title: My Badge Coverage Title | ||
hide-badge: false | ||
hide-report: false | ||
create-new-comment: false | ||
hide-comment: false | ||
junitxml-path: ./path-to-file/pytest.xml | ||
junitxml-title: My JUnit Xml Summary Title | ||
``` | ||
|
@@ -120,7 +122,7 @@ It will generate `pytest-coverage.txt` and `pytest.xml` in `/tmp` directory insi | |
docker run -v /tmp:/tmp $IMAGE_TAG python3 -m pytest --cov-report=term-missing:skip-covered --junitxml=/tmp/pytest.xml --cov=src tests/ | tee /tmp/pytest-coverage.txt | ||
- name: Pytest coverage comment | ||
uses: MishaKav/[email protected].5 | ||
uses: MishaKav/[email protected].6 | ||
with: | ||
pytest-coverage-path: /tmp/pytest-coverage.txt | ||
junitxml-path: /tmp/pytest.xml | ||
|
@@ -130,7 +132,7 @@ Example GitHub Action workflow that uses multiple files mode (see the [live work | |
|
||
```yaml | ||
- name: Pytest coverage comment | ||
uses: MishaKav/[email protected].5 | ||
uses: MishaKav/[email protected].6 | ||
with: | ||
multiple-files: | | ||
My Title 1, ./data/pytest-coverage_3.txt, ./data/pytest_1.xml | ||
|
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.
Oops, something went wrong.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters