From 3a6ac0ec3d302d04f58f9dc8bf9baa9cbe63ce4a Mon Sep 17 00:00:00 2001 From: "reportportal.io" Date: Fri, 24 Jun 2022 12:48:28 +0000 Subject: [PATCH 01/19] Changelog update --- CHANGELOG.md | 2 ++ 1 file changed, 2 insertions(+) diff --git a/CHANGELOG.md b/CHANGELOG.md index 8f7cbaf..e3e14bb 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -1,6 +1,8 @@ # Changelog ## [Unreleased] + +## [5.1.2] ### Added - `rp_log_batch_payload_size` parameter, by @HardNorth ### Changed From 5fa093318abec58b314a993ff9735b5d9a12261d Mon Sep 17 00:00:00 2001 From: "reportportal.io" Date: Fri, 24 Jun 2022 12:48:29 +0000 Subject: [PATCH 02/19] Version update --- setup.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/setup.py b/setup.py index e9b5162..873e86b 100644 --- a/setup.py +++ b/setup.py @@ -5,7 +5,7 @@ from setuptools import setup -__version__ = '5.1.2' +__version__ = '5.1.3' def read_file(fname): From 315d1c3fa581a2c59a893e0d4dc4699c352a3827 Mon Sep 17 00:00:00 2001 From: Derrick Kearney <8673892+dskard@users.noreply.github.com> Date: Mon, 5 Sep 2022 10:08:19 -0400 Subject: [PATCH 03/19] fixing link to sending attachments --- README.rst | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/README.rst b/README.rst index c6c6c38..bc6cf56 100644 --- a/README.rst +++ b/README.rst @@ -21,7 +21,7 @@ Pytest plugin for reporting test results of the Pytest to the Reportal Portal. * Contribution * Examples * Launching -* Send attachement (screenshots) +* Send attachment (screenshots) * Troubleshooting * Integration with GA * Copyright Notice @@ -223,10 +223,10 @@ Example: assert False -Send attachement (screenshots) +Send attachment (screenshots) ------------------------------ -https://github.com/reportportal/client-Python#send-attachement-screenshots +https://github.com/reportportal/client-Python#send-attachment-screenshots Test internal steps, aka "Nested steps" --------------------------------------- From 4724658e67ba450cd76c24213f4bba1a2a797649 Mon Sep 17 00:00:00 2001 From: Vadzim Hushchanskou Date: Mon, 3 Oct 2022 11:44:28 +0300 Subject: [PATCH 04/19] Client version update --- requirements.txt | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/requirements.txt b/requirements.txt index f3ba3fe..bd8ae9e 100644 --- a/requirements.txt +++ b/requirements.txt @@ -1,6 +1,6 @@ dill>=0.2.7.1 pytest>=3.8.0 -reportportal-client>=5.2.3 +reportportal-client==5.2.5 six>=1.15.0 aenum>=3.1.0 requests From 7cddd2e0e8643b3a65863a543f38242d4e68935d Mon Sep 17 00:00:00 2001 From: Vadzim Hushchanskou Date: Mon, 3 Oct 2022 12:12:20 +0300 Subject: [PATCH 05/19] Fix tests --- tests/unit/conftest.py | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/tests/unit/conftest.py b/tests/unit/conftest.py index 6068684..c7d76bc 100644 --- a/tests/unit/conftest.py +++ b/tests/unit/conftest.py @@ -57,8 +57,8 @@ def getoption_side_effect(name, default=None): mocked_config.trace = TagTracer().get('root') mocked_config.pluginmanager = mock.Mock() mocked_config.option = mock.create_autospec(Config) - mocked_config.option.rp_project = mock.sentinel.rp_project - mocked_config.option.rp_endpoint = mock.sentinel.rp_endpoint + mocked_config.option.rp_project = 'default_personal' + mocked_config.option.rp_endpoint = 'http://docker.local:8080/' mocked_config.option.rp_uuid = mock.sentinel.rp_uuid mocked_config.option.rp_log_batch_size = -1 mocked_config.option.retries = -1 From f07342ee2adceb37d6dc36d48292fd3e0f9b26b5 Mon Sep 17 00:00:00 2001 From: Vadzim Hushchanskou Date: Thu, 13 Oct 2022 11:21:03 +0300 Subject: [PATCH 06/19] Update README.rst --- README.rst | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/README.rst b/README.rst index bc6cf56..ce0406e 100644 --- a/README.rst +++ b/README.rst @@ -108,7 +108,7 @@ The following parameters are optional: - :code:`rp_hierarchy_dirs_level = 0` - Directory starting hierarchy level (from pytest.ini level) (default `0`) - :code:`rp_hierarchy_dirs = True` - Enables hierarchy for tests directories, default `False`. Doesn't support 'xdist' plugin. - :code:`rp_hierarchy_dir_path_separator` - Path separator to display directories in test hierarchy. In case of empty value current system path separator will be used (os.path.sep) -- :code:`rp_hierarchy_code` - Enables hierarchy for inner classes and parametrized tests, default `False` +- :code:`rp_hierarchy_code` - Enables hierarchy for inner classes and parametrized tests, default `False`. Doesn't support 'xdist' plugin. - :code:`rp_issue_system_url = https://bugzilla.some.com/show_bug.cgi?id={issue_id}` - issue URL (issue_id will be filled by parameter from pytest mark) - :code:`rp_issue_id_marks = True` - Enables adding marks for issue ids (e.g. "issue:123456") - :code:`rp_verify_ssl = True` - Verify SSL when connecting to the server From 5dba98e24ffe6a9929c829564545be784e209e54 Mon Sep 17 00:00:00 2001 From: Dagan Sandler <1357456+dagansandler@users.noreply.github.com> Date: Tue, 15 Nov 2022 03:18:37 +0200 Subject: [PATCH 07/19] fix test_empty_run --- examples/threads/test_thread_logging.py | 0 tests/integration/test_empty_run.py | 4 ++-- tests/integration/test_threads_logs.py | 0 3 files changed, 2 insertions(+), 2 deletions(-) create mode 100644 examples/threads/test_thread_logging.py create mode 100644 tests/integration/test_threads_logs.py diff --git a/examples/threads/test_thread_logging.py b/examples/threads/test_thread_logging.py new file mode 100644 index 0000000..e69de29 diff --git a/tests/integration/test_empty_run.py b/tests/integration/test_empty_run.py index b4a320a..a6de3d6 100644 --- a/tests/integration/test_empty_run.py +++ b/tests/integration/test_empty_run.py @@ -34,9 +34,9 @@ def test_empty_run(mock_client_init): :param mock_client_init: Pytest fixture """ - result = utils.run_pytest_tests(tests=['examples/epmty/']) + result = utils.run_pytest_tests(tests=['examples/empty/']) - assert int(result) == 4, 'Exit code should be 4 (no tests)' + assert int(result) == 5, 'Exit code should be 5 (no tests)' mock_client = mock_client_init.return_value expect(mock_client.start_launch.call_count == 1, diff --git a/tests/integration/test_threads_logs.py b/tests/integration/test_threads_logs.py new file mode 100644 index 0000000..e69de29 From 68204012bb9f609ec9d3f68ffb15d3a0f8d37763 Mon Sep 17 00:00:00 2001 From: Dagan Sandler <1357456+dagansandler@users.noreply.github.com> Date: Tue, 15 Nov 2022 03:19:51 +0200 Subject: [PATCH 08/19] added new flag to support thread logs --- pytest_reportportal/config.py | 3 ++ pytest_reportportal/plugin.py | 28 ++++++++++- pytest_reportportal/rp_logging.py | 83 +++++++++++++++++++++++++++++++ tests/unit/test_plugin.py | 4 +- 4 files changed, 116 insertions(+), 2 deletions(-) diff --git a/pytest_reportportal/config.py b/pytest_reportportal/config.py index c3561b5..7b14a3b 100644 --- a/pytest_reportportal/config.py +++ b/pytest_reportportal/config.py @@ -60,6 +60,9 @@ def __init__(self, pytest_config): self.rp_log_level = get_actual_log_level(pytest_config, 'rp_log_level') self.rp_log_format = self.find_option(pytest_config, 'rp_log_format') self.rp_mode = self.find_option(pytest_config, 'rp_mode') + self.rp_thread_logging = self.find_option( + pytest_config, 'rp_thread_logging' + ) self.rp_parent_item_id = self.find_option(pytest_config, 'rp_parent_item_id') self.rp_project = self.find_option(pytest_config, diff --git a/pytest_reportportal/plugin.py b/pytest_reportportal/plugin.py index 1a4b61a..790ec17 100644 --- a/pytest_reportportal/plugin.py +++ b/pytest_reportportal/plugin.py @@ -16,7 +16,7 @@ from pytest_reportportal import LAUNCH_WAIT_TIMEOUT from .config import AgentConfig -from .rp_logging import patching_logger_class +from .rp_logging import patching_logger_class, patching_thread_class from .service import PyTestServiceClass log = logging.getLogger(__name__) @@ -204,6 +204,24 @@ def pytest_configure(config): config.workerinput['py_test_service']) +@pytest.hookimpl(hookwrapper=True) +def pytest_runtestloop(session): + """ + Control start and finish of all test items in the session. + + :param session: pytest.Session + :return: generator object + """ + config = session.config + if not config._rp_enabled: + yield + return + + agent_config = config._reporter_config + with patching_thread_class(agent_config): + yield + + @pytest.hookimpl(hookwrapper=True) def pytest_runtest_protocol(item): """ @@ -341,6 +359,14 @@ def add_shared_option(name, help, default=None, action='store'): help='Visibility of current launch [DEFAULT, DEBUG]', default='DEFAULT' ) + add_shared_option( + name='rp_thread_logging', + help='EXPERIMENTAL: Report logs from threads. ' + 'This option applies a patch to the builtin Thread class, ' + 'and so it is turned off by default. Use with caution.', + default=False, + action='store_true' + ) parser.addini( 'rp_launch_attributes', diff --git a/pytest_reportportal/rp_logging.py b/pytest_reportportal/rp_logging.py index fff9934..15a9a86 100644 --- a/pytest_reportportal/rp_logging.py +++ b/pytest_reportportal/rp_logging.py @@ -1,11 +1,94 @@ """RPLogger class for low-level logging in tests.""" import logging +import threading from contextlib import contextmanager from functools import wraps + +from reportportal_client.client import RPClient + +from reportportal_client._local import current, set_current from reportportal_client import RPLogger +@contextmanager +def patching_thread_class(config): + """ + Add patch for Thread class. + + Set the parent thread client as the child thread's local client + """ + if not config.rp_thread_logging: + # Do nothing + yield + else: + original_start = threading.Thread.start + original_run = threading.Thread.run + try: + def wrap_start(original_func): + @wraps(original_func) + def _start(self, *args, **kwargs): + """Save the invoking thread's client if there is one.""" + # Prevent an endless loop of workers being spawned + if "_monitor" not in self.name: + current_client = current() + self.parent_rp_client = current_client + return original_func(self, *args, **kwargs) + + return _start + + def wrap_run(original_func): + @wraps(original_func) + def _run(self, *args, **kwargs): + """Create a new client for the invoked thread.""" + client = None + if ( + hasattr(self, "parent_rp_client") + and self.parent_rp_client + and not current() + ): + parent = self.parent_rp_client + client = RPClient( + endpoint=parent.endpoint, + project=parent.project, + token=parent.token, + log_batch_size=parent.log_batch_size, + is_skipped_an_issue=parent.is_skipped_an_issue, + verify_ssl=parent.verify_ssl, + retries=config.rp_retries, + launch_id=parent.launch_id + ) + if parent.current_item(): + client._item_stack.append( + parent.current_item() + ) + client.start() + try: + return original_func(self, *args, **kwargs) + finally: + if client: + # Stop the client and remove any references + client.terminate() + self.parent_rp_client = None + del self.parent_rp_client + set_current(None) + + return _run + + if not hasattr(threading.Thread, "patched"): + # patch + threading.Thread.patched = True + threading.Thread.start = wrap_start(original_start) + threading.Thread.run = wrap_run(original_run) + yield + + finally: + if hasattr(threading.Thread, "patched"): + threading.Thread.start = original_start + threading.Thread.run = original_run + del threading.Thread.patched + + @contextmanager def patching_logger_class(): """ diff --git a/tests/unit/test_plugin.py b/tests/unit/test_plugin.py index 15c74b9..aa91b46 100644 --- a/tests/unit/test_plugin.py +++ b/tests/unit/test_plugin.py @@ -318,6 +318,7 @@ def test_pytest_addoption_adds_correct_ini_file_arguments(): 'rp_uuid', 'rp_endpoint', 'rp_mode', + 'rp_thread_logging', 'rp_launch_attributes', 'rp_tests_attributes', 'rp_log_batch_size', @@ -361,7 +362,8 @@ def test_pytest_addoption_adds_correct_command_line_arguments(): '--rp-parent-item-id', '--rp-uuid', '--rp-endpoint', - '--rp-mode' + '--rp-mode', + '--rp-thread-logging' ) mock_parser = mock.MagicMock(spec=Parser) mock_reporting_group = mock_parser.getgroup.return_value From 15a95889fd3fd20bb22ca9a65e712604b053b08d Mon Sep 17 00:00:00 2001 From: Dagan Sandler <1357456+dagansandler@users.noreply.github.com> Date: Tue, 15 Nov 2022 03:20:11 +0200 Subject: [PATCH 09/19] adding a test to validate new flag --- examples/threads/__init__.py | 0 examples/threads/test_thread_logging.py | 19 +++++++++++++++ tests/integration/test_threads_logs.py | 32 +++++++++++++++++++++++++ 3 files changed, 51 insertions(+) create mode 100644 examples/threads/__init__.py diff --git a/examples/threads/__init__.py b/examples/threads/__init__.py new file mode 100644 index 0000000..e69de29 diff --git a/examples/threads/test_thread_logging.py b/examples/threads/test_thread_logging.py index e69de29..3e1b4a2 100644 --- a/examples/threads/test_thread_logging.py +++ b/examples/threads/test_thread_logging.py @@ -0,0 +1,19 @@ +import logging +import threading + +from reportportal_client.steps import step + +log = logging.getLogger(__name__) + + +def worker(): + log.info("TEST_INFO") + log.debug("TEST_DEBUG") + + +def test_log(): + t = threading.Thread(target=worker) + log.info("TEST_BEFORE_THREADING") + with step("Some nesting where the thread logs should go"): + t.start() + t.join() diff --git a/tests/integration/test_threads_logs.py b/tests/integration/test_threads_logs.py index e69de29..200bb7c 100644 --- a/tests/integration/test_threads_logs.py +++ b/tests/integration/test_threads_logs.py @@ -0,0 +1,32 @@ +from six.moves import mock + +from tests import REPORT_PORTAL_SERVICE +from tests.helpers import utils + + +@mock.patch('pytest_reportportal.rp_logging.RPClient') +@mock.patch(REPORT_PORTAL_SERVICE) +def test_rp_thread_logs_reporting(mock_client_init, mock_thread_client_init): + """Verify logs from threads are sent to correct items`. + + :param mock_client_init: Pytest fixture + """ + mock_client = mock_client_init.return_value + mock_thread_client = mock_thread_client_init.return_value + + def init_thread_client(*_, **__): + from reportportal_client._local import set_current + set_current(mock_thread_client) + return mock_thread_client + mock_thread_client_init.side_effect = init_thread_client + result = utils.run_tests_with_client( + mock_client, + ['examples/threads/'], + args=["--rp-thread-logging"] + ) + + assert int(result) == 0, 'Exit code should be 0 (no errors)' + assert mock_client.start_launch.call_count == 1, \ + '"start_launch" method was not called' + assert mock_client.log.call_count == 1 + assert mock_thread_client.log.call_count == 2 From 95662d69d16f6035411d8eea4d316699749d09f5 Mon Sep 17 00:00:00 2001 From: Dagan Sandler <1357456+dagansandler@users.noreply.github.com> Date: Tue, 15 Nov 2022 03:23:21 +0200 Subject: [PATCH 10/19] added new flag to README --- README.rst | 1 + 1 file changed, 1 insertion(+) diff --git a/README.rst b/README.rst index ce0406e..9118934 100644 --- a/README.rst +++ b/README.rst @@ -113,6 +113,7 @@ The following parameters are optional: - :code:`rp_issue_id_marks = True` - Enables adding marks for issue ids (e.g. "issue:123456") - :code:`rp_verify_ssl = True` - Verify SSL when connecting to the server - :code:`rp_mode = DEFAULT` - DEBUG or DEFAULT launch mode. DEBUG launches are displayed in a separate tab and not visible to anyone except owner +- :code:`rp_thread_logging` - EXPERIMENTAL - Enables support for reporting logs from threads by patching the builtin Thread class. Use with caution. If you like to override the above parameters from command line, or from CI environment based on your build, then pass From 4c1d9f1c121baa354da3765d0c3c94939aa8cabd Mon Sep 17 00:00:00 2001 From: Ivan Ivanou <8349078+iivanou@users.noreply.github.com> Date: Tue, 15 Nov 2022 15:37:40 +0300 Subject: [PATCH 11/19] Accommodate migration of flake8 to GitHub --- .pre-commit-config.yaml | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/.pre-commit-config.yaml b/.pre-commit-config.yaml index feba7a5..2c83d96 100644 --- a/.pre-commit-config.yaml +++ b/.pre-commit-config.yaml @@ -21,7 +21,7 @@ repos: rev: v1.0.1 hooks: - id: rst-linter -- repo: https://gitlab.com/pycqa/flake8.git - rev: 3.9.0 +- repo: https://github.com/pycqa/flake8 + rev: 5.0.4 hooks: - id: flake8 From 86468b8368a37f9f51df4fa029ab9697ed6a3aa6 Mon Sep 17 00:00:00 2001 From: Vadzim Hushchanskou Date: Thu, 17 Nov 2022 14:40:25 +0300 Subject: [PATCH 12/19] Actions version update --- .github/workflows/release.yml | 6 ++--- .github/workflows/tests.yml | 47 +++++++++++++++++++---------------- 2 files changed, 29 insertions(+), 24 deletions(-) diff --git a/.github/workflows/release.yml b/.github/workflows/release.yml index abcfd4f..f34f829 100644 --- a/.github/workflows/release.yml +++ b/.github/workflows/release.yml @@ -22,10 +22,10 @@ jobs: deploy: runs-on: ubuntu-latest steps: - - uses: actions/checkout@v2 + - uses: actions/checkout@v3 - name: Generate versions - uses: HardNorth/github-version-generate@v1.1.2 + uses: HardNorth/github-version-generate@v1 with: version-source: file version-file: ${{ env.VERSION_FILE }} @@ -45,7 +45,7 @@ jobs: git push --tags - name: Set up Python - uses: actions/setup-python@v2 + uses: actions/setup-python@v4 with: python-version: '3.6' diff --git a/.github/workflows/tests.yml b/.github/workflows/tests.yml index b37ec45..9d8b4ee 100644 --- a/.github/workflows/tests.yml +++ b/.github/workflows/tests.yml @@ -1,30 +1,35 @@ name: Tests -on: [push, pull_request] +on: [ push, pull_request ] jobs: build: runs-on: ubuntu-latest strategy: matrix: - python-version: [2.7, 3.6, 3.7, 3.8, 3.9, '3.10'] + python-version: [ 2.7, 3.6, 3.7, 3.8, 3.9, '3.10' ] steps: - - uses: actions/checkout@v2 - - name: Set up Python ${{ matrix.python-version }} - uses: actions/setup-python@v2 - with: - python-version: ${{ matrix.python-version }} - - name: Install dependencies - run: | - python -m pip install --upgrade pip - pip install tox tox-gh-actions - - name: Test with tox - run: tox - - name: Upload coverage to Codecov - if: matrix.python-version == 3.6 && success() - uses: codecov/codecov-action@v1 - with: - files: coverage.xml - flags: unittests - name: codecov-client-reportportal - path_to_write_report: codecov_report.txt + - name: Checkout repository + uses: actions/checkout@v3 + + - name: Set up Python ${{ matrix.python-version }} + uses: actions/setup-python@v4 + with: + python-version: ${{ matrix.python-version }} + + - name: Install dependencies + run: | + python -m pip install --upgrade pip + pip install tox tox-gh-actions + + - name: Test with tox + run: tox + + - name: Upload coverage to Codecov + if: matrix.python-version == 3.6 && success() + uses: codecov/codecov-action@v1 + with: + files: coverage.xml + flags: unittests + name: codecov-client-reportportal + path_to_write_report: codecov_report.txt From dbc58d37ed052aac7d5c800dc65bed3fdfc93274 Mon Sep 17 00:00:00 2001 From: Vadzim Hushchanskou Date: Thu, 17 Nov 2022 14:47:28 +0300 Subject: [PATCH 13/19] Actions version update --- .github/workflows/release.yml | 18 +++++++----------- .github/workflows/tests.yml | 2 +- 2 files changed, 8 insertions(+), 12 deletions(-) diff --git a/.github/workflows/release.yml b/.github/workflows/release.yml index f34f829..634c0dd 100644 --- a/.github/workflows/release.yml +++ b/.github/workflows/release.yml @@ -32,7 +32,7 @@ jobs: version-file-extraction-pattern: ${{ env.VERSION_EXTRACT_PATTERN }} - name: Setup git credentials - uses: oleksiyrudenko/gha-git-credentials@v2 + uses: oleksiyrudenko/gha-git-credentials@v2.1 with: name: 'reportportal.io' email: 'support@reportportal.io' @@ -62,7 +62,7 @@ jobs: password: ${{ secrets.PYPI_PASSWORD }} - name: Checkout develop branch - uses: actions/checkout@v2 + uses: actions/checkout@v3 with: ref: 'develop' fetch-depth: 0 @@ -82,22 +82,18 @@ jobs: - name: Read changelog Entry id: readChangelogEntry - uses: mindsers/changelog-reader-action@v1.3.1 + uses: mindsers/changelog-reader-action@v2 with: version: ${{ env.RELEASE_VERSION }} path: ./${{ env.CHANGE_LOG_FILE }} - name: Create Release id: createRelease - uses: actions/create-release@v1 - env: - GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }} + uses: ncipollo/release-action@v1 with: - tag_name: ${{ env.RELEASE_VERSION }} - release_name: Release ${{ env.RELEASE_VERSION }} - body: ${{ steps.readChangelogEntry.outputs.log_entry }} - draft: false - prerelease: false + tag: ${{ env.RELEASE_VERSION }} + name: Release ${{ env.RELEASE_VERSION }} + body: ${{ steps.readChangelogEntry.outputs.changes }} - name: Merge release branch into develop id: mergeIntoDevelop diff --git a/.github/workflows/tests.yml b/.github/workflows/tests.yml index 9d8b4ee..5887d24 100644 --- a/.github/workflows/tests.yml +++ b/.github/workflows/tests.yml @@ -27,7 +27,7 @@ jobs: - name: Upload coverage to Codecov if: matrix.python-version == 3.6 && success() - uses: codecov/codecov-action@v1 + uses: codecov/codecov-action@v3 with: files: coverage.xml flags: unittests From 3e700c8f3eff030ac46fb8ee389a611c0656586f Mon Sep 17 00:00:00 2001 From: Vadzim Hushchanskou Date: Thu, 17 Nov 2022 14:53:19 +0300 Subject: [PATCH 14/19] Remove 'path_to_write_report', see: https://github.com/codecov/codecov-action/issues/476 --- .github/workflows/tests.yml | 1 - 1 file changed, 1 deletion(-) diff --git a/.github/workflows/tests.yml b/.github/workflows/tests.yml index 5887d24..37e18cb 100644 --- a/.github/workflows/tests.yml +++ b/.github/workflows/tests.yml @@ -32,4 +32,3 @@ jobs: files: coverage.xml flags: unittests name: codecov-client-reportportal - path_to_write_report: codecov_report.txt From a8570e32fb18ae2357d5b35c903f0ecdc6576b9c Mon Sep 17 00:00:00 2001 From: Vadzim Hushchanskou Date: Thu, 17 Nov 2022 14:56:59 +0300 Subject: [PATCH 15/19] CHANGELOG.md update --- CHANGELOG.md | 2 ++ 1 file changed, 2 insertions(+) diff --git a/CHANGELOG.md b/CHANGELOG.md index e3e14bb..b61172f 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -1,6 +1,8 @@ # Changelog ## [Unreleased] +### Added +- Support for thread logs and `rp_thread_logging` flag, by @dagansandler ## [5.1.2] ### Added From b7966c9d9c638f860f5268207193a9ac7f7c945d Mon Sep 17 00:00:00 2001 From: Vadzim Hushchanskou Date: Mon, 21 Nov 2022 14:24:29 +0300 Subject: [PATCH 16/19] Actions version update --- .github/workflows/release.yml | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/.github/workflows/release.yml b/.github/workflows/release.yml index 634c0dd..df4a33a 100644 --- a/.github/workflows/release.yml +++ b/.github/workflows/release.yml @@ -2,7 +2,7 @@ name: Release Pytest agent on: push: - branches: ['master'] + branches: [ 'master' ] paths-ignore: - '.github/**' - CHANGELOG.md @@ -32,7 +32,7 @@ jobs: version-file-extraction-pattern: ${{ env.VERSION_EXTRACT_PATTERN }} - name: Setup git credentials - uses: oleksiyrudenko/gha-git-credentials@v2.1 + uses: oleksiyrudenko/gha-git-credentials@v2.1.1 with: name: 'reportportal.io' email: 'support@reportportal.io' From 42ffb4508d8416c527634c586e58b5645cc54199 Mon Sep 17 00:00:00 2001 From: Vadzim Hushchanskou Date: Wed, 30 Nov 2022 16:23:29 +0300 Subject: [PATCH 17/19] Fix python versions --- .github/workflows/release.yml | 2 +- .github/workflows/tests.yml | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/.github/workflows/release.yml b/.github/workflows/release.yml index df4a33a..67c1074 100644 --- a/.github/workflows/release.yml +++ b/.github/workflows/release.yml @@ -47,7 +47,7 @@ jobs: - name: Set up Python uses: actions/setup-python@v4 with: - python-version: '3.6' + python-version: '3.6.15' - name: Install dependencies run: python -m pip install --upgrade pip setuptools wheel diff --git a/.github/workflows/tests.yml b/.github/workflows/tests.yml index 37e18cb..b31610e 100644 --- a/.github/workflows/tests.yml +++ b/.github/workflows/tests.yml @@ -7,7 +7,7 @@ jobs: runs-on: ubuntu-latest strategy: matrix: - python-version: [ 2.7, 3.6, 3.7, 3.8, 3.9, '3.10' ] + python-version: [ '2.7.18', '3.6.15', '3.7.15', '3.8.15', '3.9.15', '3.10.8' ] steps: - name: Checkout repository uses: actions/checkout@v3 From dd4a5348c9412bc49b1b3d53a772ff2ecaaa37dd Mon Sep 17 00:00:00 2001 From: Vadzim Hushchanskou Date: Wed, 30 Nov 2022 16:28:19 +0300 Subject: [PATCH 18/19] Fix python versions --- .github/workflows/release.yml | 2 +- .github/workflows/tests.yml | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/.github/workflows/release.yml b/.github/workflows/release.yml index 67c1074..df4a33a 100644 --- a/.github/workflows/release.yml +++ b/.github/workflows/release.yml @@ -47,7 +47,7 @@ jobs: - name: Set up Python uses: actions/setup-python@v4 with: - python-version: '3.6.15' + python-version: '3.6' - name: Install dependencies run: python -m pip install --upgrade pip setuptools wheel diff --git a/.github/workflows/tests.yml b/.github/workflows/tests.yml index b31610e..f092720 100644 --- a/.github/workflows/tests.yml +++ b/.github/workflows/tests.yml @@ -7,7 +7,7 @@ jobs: runs-on: ubuntu-latest strategy: matrix: - python-version: [ '2.7.18', '3.6.15', '3.7.15', '3.8.15', '3.9.15', '3.10.8' ] + python-version: [ '2.7', '3.6', '3.7', '3.8', '3.9', '3.10' ] steps: - name: Checkout repository uses: actions/checkout@v3 From d43d35be52f2d955ae85e7ec2ae4012692fcfc6d Mon Sep 17 00:00:00 2001 From: Vadzim Hushchanskou Date: Wed, 30 Nov 2022 16:31:48 +0300 Subject: [PATCH 19/19] Temporary set ubuntu version to 20.04, due to: https://github.com/actions/setup-python/issues/543 --- .github/workflows/release.yml | 15 ++++++++++++++- .github/workflows/tests.yml | 15 ++++++++++++++- 2 files changed, 28 insertions(+), 2 deletions(-) diff --git a/.github/workflows/release.yml b/.github/workflows/release.yml index df4a33a..d810a56 100644 --- a/.github/workflows/release.yml +++ b/.github/workflows/release.yml @@ -1,3 +1,16 @@ +# Copyright 2022 EPAM Systems +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# You may obtain a copy of the License at +# +# https://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an "AS IS" BASIS, +# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +# See the License for the specific language governing permissions and +# limitations under the License. + name: Release Pytest agent on: @@ -20,7 +33,7 @@ env: jobs: deploy: - runs-on: ubuntu-latest + runs-on: ubuntu-20.04 steps: - uses: actions/checkout@v3 diff --git a/.github/workflows/tests.yml b/.github/workflows/tests.yml index f092720..8801ffd 100644 --- a/.github/workflows/tests.yml +++ b/.github/workflows/tests.yml @@ -1,10 +1,23 @@ +# Copyright 2022 EPAM Systems +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# You may obtain a copy of the License at +# +# https://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an "AS IS" BASIS, +# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +# See the License for the specific language governing permissions and +# limitations under the License. + name: Tests on: [ push, pull_request ] jobs: build: - runs-on: ubuntu-latest + runs-on: ubuntu-20.04 strategy: matrix: python-version: [ '2.7', '3.6', '3.7', '3.8', '3.9', '3.10' ]