Skip to content

Commit b56ee0e

Browse files
authored
test: move test upload logic to using submodule with external repository (#366)
* move test upload logic to git submodule, and use it in e2e workflow * update script folder name * checkout submodule in workflow * change submodule name
1 parent 33d7054 commit b56ee0e

5 files changed

Lines changed: 8 additions & 120 deletions

File tree

.github/workflows/e2e-test-pr.yml

Lines changed: 4 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -35,6 +35,8 @@ jobs:
3535
uses: actions/checkout@v3
3636
with:
3737
ref: ${{ inputs.sha }}
38+
fetch-depth: 0
39+
submodules: 'recursive'
3840

3941
- name: Get the hash value of the latest commit from the PR branch
4042
uses: octokit/graphql-action@v2.x
@@ -94,7 +96,7 @@ jobs:
9496
- name: Add additional information to XML report
9597
run: |
9698
filename=$(ls | grep -E '^[0-9]{12}_sdk_test_report\.xml$')
97-
python test/script/add_to_xml_test_report.py \
99+
python tod_scripts/add_to_xml_test_report.py \
98100
--branch_name "${GITHUB_REF#refs/*/}" \
99101
--gha_run_id "$GITHUB_RUN_ID" \
100102
--gha_run_number "$GITHUB_RUN_NUMBER" \
@@ -103,7 +105,7 @@ jobs:
103105
- name: Upload test results
104106
run: |
105107
report_filename=$(ls | grep -E '^[0-9]{12}_sdk_test_report\.xml$')
106-
python3 test/script/test_report_upload_script.py "${report_filename}"
108+
python3 tod_scripts/test_report_upload_script.py "${report_filename}"
107109
env:
108110
LINODE_CLI_OBJ_ACCESS_KEY: ${{ secrets.LINODE_CLI_OBJ_ACCESS_KEY }}
109111
LINODE_CLI_OBJ_SECRET_KEY: ${{ secrets.LINODE_CLI_OBJ_SECRET_KEY }}

.gitmodules

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,3 @@
1+
[submodule "tod_scripts"]
2+
path = tod_scripts
3+
url = https://github.com/linode/TOD-test-report-uploader.git

test/script/add_to_xml_test_report.py

Lines changed: 0 additions & 75 deletions
This file was deleted.

test/script/test_report_upload_script.py

Lines changed: 0 additions & 43 deletions
This file was deleted.

tod_scripts

Submodule tod_scripts added at eec4b99

0 commit comments

Comments
 (0)