From 705dbd5c60b00562df9530000096e2ff7297f92e Mon Sep 17 00:00:00 2001 From: Maciej Wilk Date: Fri, 6 Feb 2026 14:09:51 +0100 Subject: [PATCH 1/3] Add logic to upload test results for manual runs on demand only --- .github/workflows/e2e-test-pr.yml | 10 +++++++++- .github/workflows/e2e-test.yml | 13 +++++++++++-- 2 files changed, 20 insertions(+), 3 deletions(-) diff --git a/.github/workflows/e2e-test-pr.yml b/.github/workflows/e2e-test-pr.yml index 86809d177..f765b0a0d 100644 --- a/.github/workflows/e2e-test-pr.yml +++ b/.github/workflows/e2e-test-pr.yml @@ -27,6 +27,14 @@ on: pull_request_number: description: 'The number of the PR.' required: false + test_report_upload: + description: 'Indicates whether to upload the test report to object storage. Defaults to "false"' + required: false + default: 'false' + type: choice + options: + - 'true' + - 'false' name: PR E2E Tests @@ -101,7 +109,7 @@ jobs: LINODE_TOKEN: ${{ secrets.LINODE_TOKEN }} - name: Upload test results - if: always() + if: always() && github.repository == 'linode/linode_api4-python' && (github.event_name == 'pull_request' || (github.event_name == 'workflow_dispatch' && inputs.test_report_upload == 'true')) run: | filename=$(ls | grep -E '^[0-9]{12}_sdk_test_report\.xml$') python3 e2e_scripts/tod_scripts/xml_to_obj_storage/scripts/add_gha_info_to_xml.py \ diff --git a/.github/workflows/e2e-test.yml b/.github/workflows/e2e-test.yml index e2762ff95..120d0be18 100644 --- a/.github/workflows/e2e-test.yml +++ b/.github/workflows/e2e-test.yml @@ -41,6 +41,14 @@ on: options: - 'true' - 'false' + test_report_upload: + description: 'Indicates whether to upload the test report to object storage. Defaults to "false"' + required: false + default: 'false' + type: choice + options: + - 'true' + - 'false' push: branches: - main @@ -172,7 +180,8 @@ jobs: process-upload-report: runs-on: ubuntu-latest needs: [integration-tests] - if: always() && github.repository == 'linode/linode_api4-python' # Run even if integration tests fail and only on main repository + # Run even if integration tests fail on main repository AND push event OR test_report_upload is true in case of manual run + if: always() && github.repository == 'linode/linode_api4-python' && (github.event_name == 'push' || (github.event_name == 'workflow_dispatch' && inputs.test_report_upload == 'true')) outputs: summary: ${{ steps.set-test-summary.outputs.summary }} @@ -271,4 +280,4 @@ jobs: payload: | channel: ${{ secrets.SLACK_CHANNEL_ID }} thread_ts: "${{ steps.main_message.outputs.ts }}" - text: "${{ needs.process-upload-report.outputs.summary }}" + text: "${{ needs.process-upload-report.outputs.summary }}" \ No newline at end of file From 812c28883c17295415611ce0e5297cbfd51fdcd7 Mon Sep 17 00:00:00 2001 From: Maciej Wilk Date: Mon, 9 Feb 2026 15:41:11 +0100 Subject: [PATCH 2/3] Modify test_report_upload type to boolean --- .github/workflows/e2e-test.yml | 9 +++------ 1 file changed, 3 insertions(+), 6 deletions(-) diff --git a/.github/workflows/e2e-test.yml b/.github/workflows/e2e-test.yml index 120d0be18..12c822f41 100644 --- a/.github/workflows/e2e-test.yml +++ b/.github/workflows/e2e-test.yml @@ -43,12 +43,9 @@ on: - 'false' test_report_upload: description: 'Indicates whether to upload the test report to object storage. Defaults to "false"' + type: boolean required: false - default: 'false' - type: choice - options: - - 'true' - - 'false' + default: false push: branches: - main @@ -181,7 +178,7 @@ jobs: runs-on: ubuntu-latest needs: [integration-tests] # Run even if integration tests fail on main repository AND push event OR test_report_upload is true in case of manual run - if: always() && github.repository == 'linode/linode_api4-python' && (github.event_name == 'push' || (github.event_name == 'workflow_dispatch' && inputs.test_report_upload == 'true')) + if: always() && github.repository == 'linode/linode_api4-python' && (github.event_name == 'push' || (github.event_name == 'workflow_dispatch' && inputs.test_report_upload)) outputs: summary: ${{ steps.set-test-summary.outputs.summary }} From 9bde3547b642fd2efa439a902b06f79de5b40d43 Mon Sep 17 00:00:00 2001 From: Maciej Wilk Date: Mon, 9 Feb 2026 16:40:09 +0100 Subject: [PATCH 3/3] Set test_upload_report to choice type in e2e-test.yml --- .github/workflows/e2e-test.yml | 9 ++++++--- 1 file changed, 6 insertions(+), 3 deletions(-) diff --git a/.github/workflows/e2e-test.yml b/.github/workflows/e2e-test.yml index 12c822f41..5c24361d0 100644 --- a/.github/workflows/e2e-test.yml +++ b/.github/workflows/e2e-test.yml @@ -43,9 +43,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 @@ -178,7 +181,7 @@ jobs: runs-on: ubuntu-latest needs: [integration-tests] # Run even if integration tests fail on main repository AND push event OR test_report_upload is true in case of manual run - if: always() && github.repository == 'linode/linode_api4-python' && (github.event_name == 'push' || (github.event_name == 'workflow_dispatch' && inputs.test_report_upload)) + if: always() && github.repository == 'linode/linode_api4-python' && (github.event_name == 'push' || (github.event_name == 'workflow_dispatch' && inputs.test_report_upload == 'true')) outputs: summary: ${{ steps.set-test-summary.outputs.summary }}