@@ -76,20 +76,14 @@ jobs:
7676 env :
7777 LINODE_TOKEN : ${{ env.LINODE_TOKEN }}
7878
79- - name : Upload test results
79+ - name : Upload Test Report as Artifact
8080 if : always()
81- run : |
82- filename=$(ls | grep -E '^[0-9]{12}_sdk_test_report\.xml$')
83- python3 e2e_scripts/tod_scripts/xml_to_obj_storage/scripts/add_gha_info_to_xml.py \
84- --branch_name "${GITHUB_REF#refs/*/}" \
85- --gha_run_id "$GITHUB_RUN_ID" \
86- --gha_run_number "$GITHUB_RUN_NUMBER" \
87- --xmlfile "${filename}"
88- sync
89- python3 e2e_scripts/tod_scripts/xml_to_obj_storage/scripts/xml_to_obj.py "${filename}"
90- env :
91- LINODE_CLI_OBJ_ACCESS_KEY : ${{ secrets.LINODE_CLI_OBJ_ACCESS_KEY }}
92- LINODE_CLI_OBJ_SECRET_KEY : ${{ secrets.LINODE_CLI_OBJ_SECRET_KEY }}
81+ uses : actions/upload-artifact@v4
82+ with :
83+ name : test-report-file
84+ if-no-files-found : ignore
85+ path : ' *.xml'
86+ retention-days : 1
9387
9488 apply-calico-rules :
9589 runs-on : ubuntu-latest
@@ -156,6 +150,50 @@ jobs:
156150 env :
157151 LINODE_CLI_TOKEN : ${{ env.LINODE_TOKEN }}
158152
153+ process-upload-report :
154+ runs-on : ubuntu-latest
155+ needs : [integration-tests]
156+ if : always() && github.repository == 'linode/linode_api4-python' # Run even if integration tests fail and only on main repository
157+
158+ steps :
159+ - name : Checkout code
160+ uses : actions/checkout@v4
161+ with :
162+ fetch-depth : 0
163+ submodules : ' recursive'
164+
165+ - name : Download test report
166+ uses : actions/download-artifact@v4
167+ with :
168+ name : test-report-file
169+
170+ - name : Set up Python
171+ uses : actions/setup-python@v5
172+ with :
173+ python-version : ' 3.x'
174+
175+ - name : Install Python dependencies
176+ run : pip3 install requests wheel boto3==1.35.99
177+
178+ - name : Set release version env
179+ run : echo "RELEASE_VERSION=${GITHUB_REF#refs/*/}" >> $GITHUB_ENV
180+
181+
182+ - name : Add variables and upload test results
183+ if : always()
184+ run : |
185+ filename=$(ls | grep -E '^[0-9]{12}_sdk_test_report\.xml$')
186+ python3 e2e_scripts/tod_scripts/xml_to_obj_storage/scripts/add_gha_info_to_xml.py \
187+ --branch_name "${GITHUB_REF#refs/*/}" \
188+ --gha_run_id "$GITHUB_RUN_ID" \
189+ --gha_run_number "$GITHUB_RUN_NUMBER" \
190+ --xmlfile "${filename}"
191+ sync
192+ python3 e2e_scripts/tod_scripts/xml_to_obj_storage/scripts/xml_to_obj.py "${filename}"
193+ env :
194+ LINODE_CLI_OBJ_ACCESS_KEY : ${{ secrets.LINODE_CLI_OBJ_ACCESS_KEY }}
195+ LINODE_CLI_OBJ_SECRET_KEY : ${{ secrets.LINODE_CLI_OBJ_SECRET_KEY }}
196+
159197 notify-slack :
160198 runs-on : ubuntu-latest
161199 needs : [integration-tests]
0 commit comments