File tree Expand file tree Collapse file tree 2 files changed +8
-20
lines changed
Expand file tree Collapse file tree 2 files changed +8
-20
lines changed Original file line number Diff line number Diff line change @@ -44,34 +44,21 @@ jobs:
4444 run : |
4545 timestamp=$(date +'%Y%m%d%H%M')
4646 report_filename="${timestamp}_cli_test_report.xml"
47- if ! pytest tests/integration --disable-warnings --junitxml="${report_filename}"; then
48- echo "EXIT_STATUS=1" >> $GITHUB_ENV
49- fi
47+ make testint TEST_ARGS="--junitxml=${report_filename}"
5048 env :
5149 LINODE_CLI_TOKEN : ${{ secrets.LINODE_TOKEN }}
5250
53- - name : Add additional information to XML report
51+ - name : Upload test results
52+ if : always()
5453 run : |
55- filename=$(ls | grep -E '^[0-9]{12}_cli_test_report\.xml$')
54+ filename=$(ls | grep -E '^[0-9]{12}_cli_test_report\.xml$')
5655 python tod_scripts/add_to_xml_test_report.py \
5756 --branch_name "${GITHUB_REF#refs/*/}" \
5857 --gha_run_id "$GITHUB_RUN_ID" \
5958 --gha_run_number "$GITHUB_RUN_NUMBER" \
6059 --xmlfile "${filename}"
61-
62- - name : Upload test results
63- run : |
64- filename=$(ls | grep -E '^[0-9]{12}_cli_test_report\.xml$')
60+ sync
6561 python tod_scripts/test_report_upload_script.py "${filename}"
6662 env :
6763 LINODE_CLI_OBJ_ACCESS_KEY : ${{ secrets.LINODE_CLI_OBJ_ACCESS_KEY }}
68- LINODE_CLI_OBJ_SECRET_KEY : ${{ secrets.LINODE_CLI_OBJ_SECRET_KEY }}
69-
70- - name : Test Execution Status Handler
71- run : |
72- if [[ "$EXIT_STATUS" != 0 ]]; then
73- echo "Test execution contains failure(s)"
74- exit $EXIT_STATUS
75- else
76- echo "Tests passed!"
77- fi
64+ LINODE_CLI_OBJ_SECRET_KEY : ${{ secrets.LINODE_CLI_OBJ_SECRET_KEY }}
Original file line number Diff line number Diff line change 33#
44MODULE :=
55TEST_CASE_COMMAND :=
6+ TEST_ARGS :=
67
78ifdef TEST_CASE
89TEST_CASE_COMMAND = -k $(TEST_CASE )
@@ -71,7 +72,7 @@ testunit:
7172
7273.PHONY : testint
7374testint :
74- pytest tests/integration/${MODULE} ${TEST_CASE_COMMAND}
75+ pytest tests/integration/${MODULE} ${TEST_CASE_COMMAND} ${TEST_ARGS}
7576
7677.PHONY : testall
7778testall :
You can’t perform that action at this time.
0 commit comments