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

Test fork branch #442

Draft
wants to merge 6 commits into
base: master
Choose a base branch
from
Draft
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
2 changes: 1 addition & 1 deletion README.md
Expand Up @@ -328,7 +328,7 @@ Here is an example JSON:
```json
{
"title": "4 parse errors, 4 errors, 23 fail, 18 skipped, 227 pass in 39m 12s",
"summary": "  24 files  ±0      4 errors  21 suites  ±0   39m 12s [:stopwatch:](https://github.com/EnricoMi/publish-unit-test-result-action/blob/v1.20/README.md#the-symbols \"duration of all tests\") ±0s\n272 tests ±0  227 [:heavy_check_mark:](https://github.com/EnricoMi/publish-unit-test-result-action/blob/v1.20/README.md#the-symbols \"passed tests\") ±0  18 [:zzz:](https://github.com/EnricoMi/publish-unit-test-result-action/blob/v1.20/README.md#the-symbols \"skipped / disabled tests\") ±0  23 [:x:](https://github.com/EnricoMi/publish-unit-test-result-action/blob/v1.20/README.md#the-symbols \"failed tests\") ±0  4 [:fire:](https://github.com/EnricoMi/publish-unit-test-result-action/blob/v1.20/README.md#the-symbols \"test errors\") ±0 \n437 runs  ±0  354 [:heavy_check_mark:](https://github.com/EnricoMi/publish-unit-test-result-action/blob/v1.20/README.md#the-symbols \"passed tests\") ±0  53 [:zzz:](https://github.com/EnricoMi/publish-unit-test-result-action/blob/v1.20/README.md#the-symbols \"skipped / disabled tests\") ±0  25 [:x:](https://github.com/EnricoMi/publish-unit-test-result-action/blob/v1.20/README.md#the-symbols \"failed tests\") ±0  5 [:fire:](https://github.com/EnricoMi/publish-unit-test-result-action/blob/v1.20/README.md#the-symbols \"test errors\") ±0 \n\nResults for commit 11c02e56. ± Comparison against earlier commit d8ce4b6c.\n",
"summary": "  24 files  ±0      4 errors  21 suites  ±0   39m 12s [:stopwatch:](https://github.com/EnricoMi/publish-unit-test-result-action/blob/v2.6.1/README.md#the-symbols \"duration of all tests\") ±0s\n272 tests ±0  227 [:heavy_check_mark:](https://github.com/EnricoMi/publish-unit-test-result-action/blob/v2.6.1/README.md#the-symbols \"passed tests\") ±0  18 [:zzz:](https://github.com/EnricoMi/publish-unit-test-result-action/blob/v2.6.1/README.md#the-symbols \"skipped / disabled tests\") ±0  23 [:x:](https://github.com/EnricoMi/publish-unit-test-result-action/blob/v2.6.1/README.md#the-symbols \"failed tests\") ±0  4 [:fire:](https://github.com/EnricoMi/publish-unit-test-result-action/blob/v2.6.1/README.md#the-symbols \"test errors\") ±0 \n437 runs  ±0  354 [:heavy_check_mark:](https://github.com/EnricoMi/publish-unit-test-result-action/blob/v2.6.1/README.md#the-symbols \"passed tests\") ±0  53 [:zzz:](https://github.com/EnricoMi/publish-unit-test-result-action/blob/v2.6.1/README.md#the-symbols \"skipped / disabled tests\") ±0  25 [:x:](https://github.com/EnricoMi/publish-unit-test-result-action/blob/v2.6.1/README.md#the-symbols \"failed tests\") ±0  5 [:fire:](https://github.com/EnricoMi/publish-unit-test-result-action/blob/v2.6.1/README.md#the-symbols \"test errors\") ±0 \n\nResults for commit 11c02e56. ± Comparison against earlier commit d8ce4b6c.\n",
"conclusion": "success",
"stats": {
"files": 24,
Expand Down
6 changes: 4 additions & 2 deletions python/publish/__init__.py
Expand Up @@ -10,6 +10,9 @@
from publish.unittestresults import Numeric, UnitTestSuite, UnitTestCaseResults, UnitTestRunResults, \
UnitTestRunDeltaResults, UnitTestRunResultsOrDeltaResults, ParseError

# keep the version in sync with action.yml
__version__ = 'v2.6.2'

logger = logging.getLogger('publish')
digest_prefix = '[test-results]:data:'
digest_mime_type = 'application/gzip'
Expand Down Expand Up @@ -419,8 +422,7 @@ def get_test_summary():
def get_link_and_tooltip_label_md(label: str, tooltip: str) -> str:
return '[{label}]({link} "{tooltip}")'.format(
label=label,
# bump the version if you change the target of this link (if it did not exist already) or change the section
link='https://github.com/EnricoMi/publish-unit-test-result-action/blob/v1.20/README.md#the-symbols',
link=f'https://github.com/EnricoMi/publish-unit-test-result-action/blob/{__version__}/README.md#the-symbols',
EnricoMi marked this conversation as resolved.
Show resolved Hide resolved
tooltip=tooltip
)

Expand Down
5 changes: 2 additions & 3 deletions python/publish_test_results.py
Expand Up @@ -15,7 +15,7 @@
from urllib3.util.retry import Retry

import publish.github_action
from publish import available_annotations, default_annotations, none_annotations, \
from publish import __version__, available_annotations, default_annotations, none_annotations, \
report_suite_out_log, report_suite_err_log, report_suite_logs, default_report_suite_logs, available_report_suite_logs, \
pull_request_build_modes, fail_on_modes, fail_on_mode_errors, fail_on_mode_failures, \
comment_mode_always, comment_modes, punctuation_space
Expand Down Expand Up @@ -223,11 +223,10 @@ def main(settings: Settings, gha: GithubAction) -> None:
if settings.event_file is None and \
settings.event_name == 'pull_request' and \
settings.event.get('pull_request', {}).get('head', {}).get('repo', {}).get('full_name') != settings.repo:
# bump the version if you change the target of this link (if it did not exist already) or change the section
gha.warning(f'This action is running on a pull_request event for a fork repository. '
f'It cannot do anything useful like creating check runs or pull request comments. '
f'To run the action on fork repository pull requests, see '
f'https://github.com/EnricoMi/publish-unit-test-result-action/blob/v1.20/README.md#support-fork-repositories-and-dependabot-branches')
f'https://github.com/EnricoMi/publish-unit-test-result-action/blob/{__version__}/README.md#support-fork-repositories-and-dependabot-branches')
return

# log the available RAM to help spot OOM issues:
Expand Down
10 changes: 5 additions & 5 deletions python/test/files/dart/json/tests.annotations
Expand Up @@ -9,18 +9,18 @@
'summary':
'20 tests\u2002\u2003\u200316 '
'[:heavy_check_mark:](https://github.com/EnricoMi/publish-unit-test-re'
'sult-action/blob/v1.20/README.md#the-symbols "passed tests")\u2003\u2003'
'sult-action/blob/VERSION/README.md#the-symbols "passed tests")\u2003\u2003'
'0s '
'[:stopwatch:](https://github.com/EnricoMi/publish-unit-test-result-ac'
'tion/blob/v1.20/README.md#the-symbols "duration of all tests")\n\u205f\u2004'
'tion/blob/VERSION/README.md#the-symbols "duration of all tests")\n\u205f\u2004'
'4 suites\u2003\u2003\u205f\u20041 '
'[:zzz:](https://github.com/EnricoMi/publish-unit-test-result-action/b'
'lob/v1.20/README.md#the-symbols "skipped / disabled tests")\n\u205f\u2004'
'lob/VERSION/README.md#the-symbols "skipped / disabled tests")\n\u205f\u2004'
'1 files\u2004\u2002\u2003\u2003\u205f\u20041 '
'[:x:](https://github.com/EnricoMi/publish-unit-test-result-action/blo'
'b/v1.20/README.md#the-symbols "failed tests")\u2003\u20032 '
'b/VERSION/README.md#the-symbols "failed tests")\u2003\u20032 '
'[:fire:](https://github.com/EnricoMi/publish-unit-test-result-action/'
'blob/v1.20/README.md#the-symbols "test errors")\n\nResults for '
'blob/VERSION/README.md#the-symbols "test errors")\n\nResults for '
'commit commit s.\n\n'
'[test-results]:data:application/gzip;base64,H4sIAAAAAAAC/1WMTQqAIBBGr'
'yKuW1REiy4TYkVDpTHqKrp74w+au3nvY97DNzhXwyfWNYwbBzbAQLA4FBa0ImwJabB+6j'
Expand Down
12 changes: 6 additions & 6 deletions python/test/files/junit-xml/bazel/suite-logs.annotations
Expand Up @@ -9,18 +9,18 @@
'summary':
'1 tests\u2002\u2003\u20030 '
'[:heavy_check_mark:](https://github.com/EnricoMi/publish-unit-test-re'
'sult-action/blob/v1.20/README.md#the-symbols "passed tests")\u2003\u2003'
'sult-action/blob/VERSION/README.md#the-symbols "passed tests")\u2003\u2003'
'0s '
'[:stopwatch:](https://github.com/EnricoMi/publish-unit-test-result-ac'
'tion/blob/v1.20/README.md#the-symbols "duration of all tests")\n1 '
'tion/blob/VERSION/README.md#the-symbols "duration of all tests")\n1 '
'suites\u2003\u20030 '
'[:zzz:](https://github.com/EnricoMi/publish-unit-test-result-action/b'
'lob/v1.20/README.md#the-symbols "skipped / disabled tests")\n1 files\u2004'
'\u2002\u2003\u20030 '
'lob/VERSION/README.md#the-symbols "skipped / disabled tests")\n1 '
'files\u2004\u2002\u2003\u20030 '
'[:x:](https://github.com/EnricoMi/publish-unit-test-result-action/blo'
'b/v1.20/README.md#the-symbols "failed tests")\u2003\u20031 '
'b/VERSION/README.md#the-symbols "failed tests")\u2003\u20031 '
'[:fire:](https://github.com/EnricoMi/publish-unit-test-result-action/'
'blob/v1.20/README.md#the-symbols "test errors")\n\nResults for '
'blob/VERSION/README.md#the-symbols "test errors")\n\nResults for '
'commit commit s.\n\n'
'[test-results]:data:application/gzip;base64,H4sIAAAAAAAC/1WMMQ6AIBAEv'
'0KoLbT1M4QgxIsC5g4q498liHp0OzvJnNLBbknOYhqEpAzpgyWjThBDwbFgEelVdSvKxn'
Expand Down
10 changes: 5 additions & 5 deletions python/test/files/junit-xml/jest/jest-junit.annotations
Expand Up @@ -9,16 +9,16 @@
'summary':
'2 tests\u2002\u2003\u20032 '
'[:heavy_check_mark:](https://github.com/EnricoMi/publish-unit-test-re'
'sult-action/blob/v1.20/README.md#the-symbols "passed tests")\u2003\u2003'
'sult-action/blob/VERSION/README.md#the-symbols "passed tests")\u2003\u2003'
'0s '
'[:stopwatch:](https://github.com/EnricoMi/publish-unit-test-result-ac'
'tion/blob/v1.20/README.md#the-symbols "duration of all tests")\n1 '
'tion/blob/VERSION/README.md#the-symbols "duration of all tests")\n1 '
'suites\u2003\u20030 '
'[:zzz:](https://github.com/EnricoMi/publish-unit-test-result-action/b'
'lob/v1.20/README.md#the-symbols "skipped / disabled tests")\n1 files\u2004'
'\u2002\u2003\u20030 '
'lob/VERSION/README.md#the-symbols "skipped / disabled tests")\n1 '
'files\u2004\u2002\u2003\u20030 '
'[:x:](https://github.com/EnricoMi/publish-unit-test-result-action/blo'
'b/v1.20/README.md#the-symbols "failed tests")\n\nResults for commit '
'b/VERSION/README.md#the-symbols "failed tests")\n\nResults for commit '
'commit s.\n\n'
'[test-results]:data:application/gzip;base64,H4sIAAAAAAAC/1WMOw6AIBBEr'
'0KoLdTSyxCCEDfyMQtUxrsLCgrdvJnJO6kCLT1dyDQQ6iOED9aIPICzCceEaQh5mmtmPg'
Expand Down
18 changes: 9 additions & 9 deletions python/test/files/junit-xml/junit.multiresult.annotations
Expand Up @@ -9,25 +9,25 @@
'summary':
'1 files\u2004\u20031 suites\u2004\u2003\u20021s '
'[:stopwatch:](https://github.com/EnricoMi/publish-unit-test-result-ac'
'tion/blob/v1.20/README.md#the-symbols "duration of all tests")\n4 '
'tion/blob/VERSION/README.md#the-symbols "duration of all tests")\n4 '
'tests\u20031 '
'[:heavy_check_mark:](https://github.com/EnricoMi/publish-unit-test-re'
'sult-action/blob/v1.20/README.md#the-symbols "passed tests")\u20031 '
'sult-action/blob/VERSION/README.md#the-symbols "passed tests")\u20031 '
'[:zzz:](https://github.com/EnricoMi/publish-unit-test-result-action/b'
'lob/v1.20/README.md#the-symbols "skipped / disabled tests")\u20031 '
'lob/VERSION/README.md#the-symbols "skipped / disabled tests")\u20031 '
'[:x:](https://github.com/EnricoMi/publish-unit-test-result-action/blo'
'b/v1.20/README.md#the-symbols "failed tests")\u20031 '
'b/VERSION/README.md#the-symbols "failed tests")\u20031 '
'[:fire:](https://github.com/EnricoMi/publish-unit-test-result-action/'
'blob/v1.20/README.md#the-symbols "test errors")\n4 runs\u2006\u2003'
'blob/VERSION/README.md#the-symbols "test errors")\n4 runs\u2006\u2003'
'-2 '
'[:heavy_check_mark:](https://github.com/EnricoMi/publish-unit-test-re'
'sult-action/blob/v1.20/README.md#the-symbols "passed tests")\u20033 '
'sult-action/blob/VERSION/README.md#the-symbols "passed tests")\u20033 '
'[:zzz:](https://github.com/EnricoMi/publish-unit-test-result-action/b'
'lob/v1.20/README.md#the-symbols "skipped / disabled tests")\u20032 '
'lob/VERSION/README.md#the-symbols "skipped / disabled tests")\u20032 '
'[:x:](https://github.com/EnricoMi/publish-unit-test-result-action/blo'
'b/v1.20/README.md#the-symbols "failed tests")\u20031 '
'b/VERSION/README.md#the-symbols "failed tests")\u20031 '
'[:fire:](https://github.com/EnricoMi/publish-unit-test-result-action/'
'blob/v1.20/README.md#the-symbols "test errors")\n\nResults for '
'blob/VERSION/README.md#the-symbols "test errors")\n\nResults for '
'commit commit s.\n\n'
'[test-results]:data:application/gzip;base64,H4sIAAAAAAAC/1WMOw6AIBAFr'
'0KotfBTeRlCEONGPmYXKuPdlQhEujdvkrn4BkYTX9jQMU4RQoU1ogzgXcZXhKTmsgVFpf'
Expand Down
12 changes: 6 additions & 6 deletions python/test/files/junit-xml/minimal-attributes.annotations
Expand Up @@ -9,18 +9,18 @@
'summary':
'4 tests\u2002\u2003\u20031 '
'[:heavy_check_mark:](https://github.com/EnricoMi/publish-unit-test-re'
'sult-action/blob/v1.20/README.md#the-symbols "passed tests")\u2003\u2003'
'sult-action/blob/VERSION/README.md#the-symbols "passed tests")\u2003\u2003'
'0s '
'[:stopwatch:](https://github.com/EnricoMi/publish-unit-test-result-ac'
'tion/blob/v1.20/README.md#the-symbols "duration of all tests")\n1 '
'tion/blob/VERSION/README.md#the-symbols "duration of all tests")\n1 '
'suites\u2003\u20031 '
'[:zzz:](https://github.com/EnricoMi/publish-unit-test-result-action/b'
'lob/v1.20/README.md#the-symbols "skipped / disabled tests")\n1 files\u2004'
'\u2002\u2003\u20031 '
'lob/VERSION/README.md#the-symbols "skipped / disabled tests")\n1 '
'files\u2004\u2002\u2003\u20031 '
'[:x:](https://github.com/EnricoMi/publish-unit-test-result-action/blo'
'b/v1.20/README.md#the-symbols "failed tests")\u2003\u20031 '
'b/VERSION/README.md#the-symbols "failed tests")\u2003\u20031 '
'[:fire:](https://github.com/EnricoMi/publish-unit-test-result-action/'
'blob/v1.20/README.md#the-symbols "test errors")\n\nResults for '
'blob/VERSION/README.md#the-symbols "test errors")\n\nResults for '
'commit commit s.\n\n'
'[test-results]:data:application/gzip;base64,H4sIAAAAAAAC/1WMOw6AIBAFr'
'0KoLTSx8jKGIMSNfMwClfHuAoJC92Z2MxeVoISjC5kGQl0A/8EWkHmwJuIYMR58Os11ry'
Expand Down
14 changes: 7 additions & 7 deletions python/test/files/junit-xml/mocha/latex-utensils.annotations
Expand Up @@ -10,21 +10,21 @@
'\u205f\u2004\u205f\u20041 files\u2004\u2003\u205f\u2004\u205f\u20041 '
'suites\u2004\u2003\u20020s '
'[:stopwatch:](https://github.com/EnricoMi/publish-unit-test-result-ac'
'tion/blob/v1.20/README.md#the-symbols "duration of all tests")\n101 '
'tion/blob/VERSION/README.md#the-symbols "duration of all tests")\n101 '
'tests\u2003101 '
'[:heavy_check_mark:](https://github.com/EnricoMi/publish-unit-test-re'
'sult-action/blob/v1.20/README.md#the-symbols "passed tests")\u20030 '
'sult-action/blob/VERSION/README.md#the-symbols "passed tests")\u20030 '
'[:zzz:](https://github.com/EnricoMi/publish-unit-test-result-action/b'
'lob/v1.20/README.md#the-symbols "skipped / disabled tests")\u20030 '
'lob/VERSION/README.md#the-symbols "skipped / disabled tests")\u20030 '
'[:x:](https://github.com/EnricoMi/publish-unit-test-result-action/blo'
'b/v1.20/README.md#the-symbols "failed tests")\n109 runs\u2006\u2003'
'b/VERSION/README.md#the-symbols "failed tests")\n109 runs\u2006\u2003'
'109 '
'[:heavy_check_mark:](https://github.com/EnricoMi/publish-unit-test-re'
'sult-action/blob/v1.20/README.md#the-symbols "passed tests")\u20030 '
'sult-action/blob/VERSION/README.md#the-symbols "passed tests")\u20030 '
'[:zzz:](https://github.com/EnricoMi/publish-unit-test-result-action/b'
'lob/v1.20/README.md#the-symbols "skipped / disabled tests")\u20030 '
'lob/VERSION/README.md#the-symbols "skipped / disabled tests")\u20030 '
'[:x:](https://github.com/EnricoMi/publish-unit-test-result-action/blo'
'b/v1.20/README.md#the-symbols "failed tests")\n\nResults for commit '
'b/VERSION/README.md#the-symbols "failed tests")\n\nResults for commit '
'commit s.\n\n'
'[test-results]:data:application/gzip;base64,H4sIAAAAAAAC/12MMQ6AIBAEv'
'0KoLaDUzxCCEC8imAMq498liIJ2N7O5OagBqwOdCB8IDQniC3NCGcG7jCxjHmKZGH9IhK'
Expand Down
12 changes: 6 additions & 6 deletions python/test/files/junit-xml/no-attributes.annotations
Expand Up @@ -9,18 +9,18 @@
'summary':
'4 tests\u2002\u2003\u20031 '
'[:heavy_check_mark:](https://github.com/EnricoMi/publish-unit-test-re'
'sult-action/blob/v1.20/README.md#the-symbols "passed tests")\u2003\u2003'
'sult-action/blob/VERSION/README.md#the-symbols "passed tests")\u2003\u2003'
'0s '
'[:stopwatch:](https://github.com/EnricoMi/publish-unit-test-result-ac'
'tion/blob/v1.20/README.md#the-symbols "duration of all tests")\n1 '
'tion/blob/VERSION/README.md#the-symbols "duration of all tests")\n1 '
'suites\u2003\u20031 '
'[:zzz:](https://github.com/EnricoMi/publish-unit-test-result-action/b'
'lob/v1.20/README.md#the-symbols "skipped / disabled tests")\n1 files\u2004'
'\u2002\u2003\u20031 '
'lob/VERSION/README.md#the-symbols "skipped / disabled tests")\n1 '
'files\u2004\u2002\u2003\u20031 '
'[:x:](https://github.com/EnricoMi/publish-unit-test-result-action/blo'
'b/v1.20/README.md#the-symbols "failed tests")\u2003\u20031 '
'b/VERSION/README.md#the-symbols "failed tests")\u2003\u20031 '
'[:fire:](https://github.com/EnricoMi/publish-unit-test-result-action/'
'blob/v1.20/README.md#the-symbols "test errors")\n\nResults for '
'blob/VERSION/README.md#the-symbols "test errors")\n\nResults for '
'commit commit s.\n\n'
'[test-results]:data:application/gzip;base64,H4sIAAAAAAAC/1WMOw6AIBAFr'
'0KoLTSx8jKGIMSNfMwClfHuAoJC92Z2MxeVoISjC5kGQl0A/8EWkHmwJuIYMR58Os11ry'
Expand Down
10 changes: 5 additions & 5 deletions python/test/files/junit-xml/no-cases-but-tests.annotations
Expand Up @@ -9,16 +9,16 @@
'summary':
'6 tests\u2002\u2003\u20033 '
'[:heavy_check_mark:](https://github.com/EnricoMi/publish-unit-test-re'
'sult-action/blob/v1.20/README.md#the-symbols "passed tests")\u2003\u2003'
'sult-action/blob/VERSION/README.md#the-symbols "passed tests")\u2003\u2003'
'0s '
'[:stopwatch:](https://github.com/EnricoMi/publish-unit-test-result-ac'
'tion/blob/v1.20/README.md#the-symbols "duration of all tests")\n1 '
'tion/blob/VERSION/README.md#the-symbols "duration of all tests")\n1 '
'suites\u2003\u20032 '
'[:zzz:](https://github.com/EnricoMi/publish-unit-test-result-action/b'
'lob/v1.20/README.md#the-symbols "skipped / disabled tests")\n1 files\u2004'
'\u2002\u2003\u20031 '
'lob/VERSION/README.md#the-symbols "skipped / disabled tests")\n1 '
'files\u2004\u2002\u2003\u20031 '
'[:x:](https://github.com/EnricoMi/publish-unit-test-result-action/blo'
'b/v1.20/README.md#the-symbols "failed tests")\n\nResults for commit '
'b/VERSION/README.md#the-symbols "failed tests")\n\nResults for commit '
'commit s.\n\n'
'[test-results]:data:application/gzip;base64,H4sIAAAAAAAC/02MOw6AIBAFr'
'0KoLfwkFl7GEJS4UcEsUBnv7spH6N7MS+bmCo7V8ol1DePWg/th8SgcGE3YEtLhvmvMe7'
Expand Down