From a2fab6735a98f78c64ceacb05554439cd07b35b6 Mon Sep 17 00:00:00 2001 From: Maciej Wilk Date: Wed, 4 Feb 2026 14:43:43 +0100 Subject: [PATCH 1/3] Add condition to upload XML int test reports on push only --- .github/workflows/e2e-suite.yml | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/.github/workflows/e2e-suite.yml b/.github/workflows/e2e-suite.yml index bb8a644..3254ca2 100644 --- a/.github/workflows/e2e-suite.yml +++ b/.github/workflows/e2e-suite.yml @@ -65,8 +65,8 @@ jobs: ls -l hack/ cp hack/*_py_metadata_test_report.xml . - - name: Copy report to root and Upload test results - if: always() + - name: Add variables and upload test results + if: always() && github.event_name == 'push' run: | filename=$(ls | grep -E '^[0-9]{12}_py_metadata_test_report\.xml$') python3 e2e_scripts/tod_scripts/xml_to_obj_storage/scripts/add_gha_info_to_xml.py \ From a7405ae4e5a49a19bd417c2c9e9756bfedb3a083 Mon Sep 17 00:00:00 2001 From: Maciej Wilk Date: Mon, 9 Feb 2026 13:37:22 +0100 Subject: [PATCH 2/3] Add option to upload test report for manual runs on demand only --- .github/workflows/e2e-suite.yml | 7 ++++++- 1 file changed, 6 insertions(+), 1 deletion(-) diff --git a/.github/workflows/e2e-suite.yml b/.github/workflows/e2e-suite.yml index 3254ca2..4641c8f 100644 --- a/.github/workflows/e2e-suite.yml +++ b/.github/workflows/e2e-suite.yml @@ -17,6 +17,11 @@ on: options: - 'true' - 'false' + test_report_upload: + description: 'Indicates whether to upload the test report to object storage. Defaults to "false"' + type: boolean + required: false + default: false push: branches: - main @@ -66,7 +71,7 @@ jobs: cp hack/*_py_metadata_test_report.xml . - name: Add variables and upload test results - if: always() && github.event_name == 'push' + if: ${{ always() && github.repository == 'linode/py-metadata' && (github.event_name == 'push' || (github.event_name == 'workflow_dispatch' && inputs.test_report_upload)) }} run: | filename=$(ls | grep -E '^[0-9]{12}_py_metadata_test_report\.xml$') python3 e2e_scripts/tod_scripts/xml_to_obj_storage/scripts/add_gha_info_to_xml.py \ From 7769ff20c7de4f72bcc0a4217c213f0a18a59c26 Mon Sep 17 00:00:00 2001 From: Maciej Wilk Date: Mon, 9 Feb 2026 17:10:33 +0100 Subject: [PATCH 3/3] Set test_upload_report to choice type as it is unequivocal --- .github/workflows/e2e-suite.yml | 9 ++++++--- 1 file changed, 6 insertions(+), 3 deletions(-) diff --git a/.github/workflows/e2e-suite.yml b/.github/workflows/e2e-suite.yml index 4641c8f..8b8f1f9 100644 --- a/.github/workflows/e2e-suite.yml +++ b/.github/workflows/e2e-suite.yml @@ -19,9 +19,12 @@ on: - 'false' test_report_upload: description: 'Indicates whether to upload the test report to object storage. Defaults to "false"' - type: boolean + type: choice required: false - default: false + default: 'false' + options: + - 'true' + - 'false' push: branches: - main @@ -71,7 +74,7 @@ jobs: cp hack/*_py_metadata_test_report.xml . - name: Add variables and upload test results - if: ${{ always() && github.repository == 'linode/py-metadata' && (github.event_name == 'push' || (github.event_name == 'workflow_dispatch' && inputs.test_report_upload)) }} + if: always() && github.repository == 'linode/py-metadata' && (github.event_name == 'push' || (github.event_name == 'workflow_dispatch' && inputs.test_report_upload == 'true')) run: | filename=$(ls | grep -E '^[0-9]{12}_py_metadata_test_report\.xml$') python3 e2e_scripts/tod_scripts/xml_to_obj_storage/scripts/add_gha_info_to_xml.py \