diff --git a/Dockerfile b/Dockerfile index 79e80488..2f73d908 100644 --- a/Dockerfile +++ b/Dockerfile @@ -18,6 +18,6 @@ RUN apk add --no-cache build-base libffi-dev; \ apk del build-base libffi-dev COPY python/publish /action/publish -COPY python/publish_unit_test_results.py /action/ +COPY python/publish_test_results.py /action/ -ENTRYPOINT ["python", "/action/publish_unit_test_results.py"] +ENTRYPOINT ["python", "/action/publish_test_results.py"] diff --git a/action.yml b/action.yml index dffcf2c2..8c11b3cd 100644 --- a/action.yml +++ b/action.yml @@ -1,4 +1,4 @@ -name: 'Publish Unit Test Results' +name: 'Publish Test Results' author: 'EnricoMi' description: 'A GitHub Action that publishes test results on GitHub' diff --git a/composite/action.yml b/composite/action.yml index 60867550..b393a16f 100644 --- a/composite/action.yml +++ b/composite/action.yml @@ -1,4 +1,4 @@ -name: 'Publish Unit Test Results' +name: 'Publish Test Results' author: 'EnricoMi' description: 'A GitHub Action that publishes test results on GitHub' @@ -141,7 +141,7 @@ runs: id: test-results run: | echo '##[group]Publish Test Results' - python3 $GITHUB_ACTION_PATH/../python/publish_unit_test_results.py + python3 $GITHUB_ACTION_PATH/../python/publish_test_results.py echo '##[endgroup]' env: GITHUB_TOKEN: ${{ inputs.github_token }} diff --git a/python/publish_unit_test_results.py b/python/publish_test_results.py similarity index 100% rename from python/publish_unit_test_results.py rename to python/publish_test_results.py diff --git a/python/test/test_action_script.py b/python/test/test_action_script.py index 538ef5e1..70dcc6f3 100644 --- a/python/test/test_action_script.py +++ b/python/test/test_action_script.py @@ -12,7 +12,7 @@ hide_comments_modes, pull_request_build_modes, punctuation_space from publish.github_action import GithubAction from publish.unittestresults import ParsedUnitTestResults, ParseError -from publish_unit_test_results import get_conclusion, get_commit_sha, get_var, \ +from publish_test_results import get_conclusion, get_commit_sha, get_var, \ get_settings, get_annotations_config, Settings, get_files, throttle_gh_request_raw, is_float, main from test import chdir @@ -489,7 +489,7 @@ def do_test_get_settings(self, # its true behaviour is tested in get_annotations_config* annotations_config = options.get('CHECK_RUN_ANNOTATIONS').split(',') \ if options.get('CHECK_RUN_ANNOTATIONS') is not None else [] - with mock.patch('publish_unit_test_results.get_annotations_config', return_value=annotations_config) as m: + with mock.patch('publish_test_results.get_annotations_config', return_value=annotations_config) as m: if gha is None: gha = mock.MagicMock() actual = get_settings(options, gha) @@ -745,7 +745,7 @@ def test_get_files_include_and_exclude(self): self.assertEqual(['file2.txt'], sorted(files)) def test_get_files_with_mock(self): - with mock.patch('publish_unit_test_results.glob') as m: + with mock.patch('publish_test_results.glob') as m: files = get_files('*.txt\n!file1.txt') self.assertEqual([], files) self.assertEqual([mock.call('*.txt', recursive=True), mock.call('file1.txt', recursive=True)], m.call_args_list) @@ -758,7 +758,7 @@ def test_throttle_gh_request_raw(self): throttled_method = throttle_gh_request_raw(2, 5, method) def test_request(verb: str, expected_sleep: Optional[float]): - with mock.patch('publish_unit_test_results.time.sleep') as sleep: + with mock.patch('publish_test_results.time.sleep') as sleep: response = throttled_method('cnx', verb, 'url', 'headers', 'input') self.assertEqual('response', response) @@ -830,7 +830,7 @@ def do_raise(*args): # if this is raised, the tested main method did not return where expected but continued raise RuntimeError('This is not expected to be called') - with mock.patch('publish_unit_test_results.get_files') as m: + with mock.patch('publish_test_results.get_files') as m: m.side_effect = do_raise main(settings, gha) diff --git a/python/test/test_github.py b/python/test/test_github.py index 8f700bf8..baaeb029 100644 --- a/python/test/test_github.py +++ b/python/test/test_github.py @@ -12,7 +12,7 @@ import requests.exceptions from flask import Flask, Response -from publish_unit_test_results import get_github +from publish_test_results import get_github from publish.github_action import GithubAction