Skip to content

Commit d649d74

Browse files
[SYNC] Synced with version 2.1.1
2 parents 71e7167 + cb2df10 commit d649d74

3 files changed

Lines changed: 44 additions & 6 deletions

File tree

.github/actions/check-control/action.yml

Lines changed: 10 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -317,6 +317,14 @@ runs:
317317
printf "::debug:: %s\n" "Will use title $title_input" ;
318318
sanitized_input_title_field=$(printf "%s%s" 'output[title]=' "$title_input" ;)
319319
printf "%s\n" "::endgroup::"
320+
printf "%s\n" "::group::validate-summary"
321+
summary_input="${RAW_CHECK_SUMMARY_INPUT}" || summary_input="" ;
322+
sanitized_input_summary_field=$(printf "%s%s" 'output[summary]=' "$summary_input" ;)
323+
printf "%s\n" "::endgroup::"
324+
printf "%s\n" "::group::validate-description"
325+
text_input="${RAW_CHECK_TEXT_INPUT}" || text_input="" ;
326+
sanitized_input_text_field=$(printf "%s%s" 'output[text]=' "$text_input" ;)
327+
printf "%s\n" "::endgroup::"
320328
printf "%s\n" "::group::update-check"
321329
# GitHub CLI api
322330
# https://cli.github.com/manual/gh_api
@@ -326,7 +334,7 @@ runs:
326334
-f "status=${{ inputs.status }}" \
327335
-f "details_url=${{ steps.output_check_details_url.outputs.details_url }}" \
328336
-f "$sanitized_input_title_field" \
329-
-f 'output[summary]=${RAW_CHECK_SUMMARY_INPUT}' -f 'output[text]=${RAW_CHECK_TEXT_INPUT}'
337+
-f "$sanitized_input_summary_field" -f "$sanitized_input_text_field"
330338
printf "%s\n" "::endgroup::"
331339
- name: "Update Check"
332340
id: complete_check
@@ -358,7 +366,7 @@ runs:
358366
-f "completed_at=${{ steps.output_date.outputs.check_date }}Z" \
359367
-f "details_url=${{ steps.output_check_details_url.outputs.details_url }}" \
360368
-f "$sanitized_input_title_field" \
361-
-f 'output[summary]=${RAW_CHECK_SUMMARY_INPUT}' -f 'output[text]=${RAW_CHECK_TEXT_INPUT}'
369+
-f 'output[summary]='"${RAW_CHECK_SUMMARY_INPUT}" -f 'output[text]='"${RAW_CHECK_TEXT_INPUT}"
362370
printf "%s\n" "::endgroup::"
363371
- name: "Report outcome of checks API"
364372
id: output_check_outcome

.github/workflows/Tests.yml

Lines changed: 31 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -476,7 +476,9 @@ jobs:
476476
coveralls-token: ${{ github.server_url == 'https://github.com' && secrets.COVERALLS_REPO_TOKEN || '' }}
477477
- name: Generate Doctest Coverage for py${{ matrix.python-version }} on ${{ matrix.os }}
478478
id: doctests-main
479-
run: make -f Makefile test-mat-doctests ;
479+
shell: bash
480+
run: |
481+
make -f Makefile test-mat-doctests || exit 1
480482
- name: Upload Python ${{ matrix.python-version }} doctest coverage to Codecov
481483
id: doctests-codecov-upload
482484
uses: codecov/codecov-action@671740ac38dd9b0130fbe1cec585b89eea48d3de # v5.5.2
@@ -803,6 +805,31 @@ jobs:
803805
id: post-style-test
804806
run: make -j1 -f Makefile clean || true ;
805807
if: ${{ success() }}
808+
- name: "Evaluate Style-Tests"
809+
id: styletests_outcome
810+
if: ${{ !cancelled() }}
811+
shell: bash
812+
run: |
813+
if [[ "${{ steps.style.outcome }}" == "success" ]] ; then
814+
THE_RESULT="success"
815+
else
816+
THE_RESULT="failure"
817+
fi
818+
if [[ "${THE_RESULT}" == "success" ]] ; then
819+
exit 0
820+
else
821+
exit 1
822+
fi
823+
- name: "Summarize Style-Tests"
824+
id: style_report
825+
if: ${{ always() }}
826+
shell: bash
827+
run: |
828+
if [[ "${{ steps.styletests_outcome.outcome }}" == "success" ]] ; then
829+
printf "%s\n" " ${PASS_ICON} Style Checks succeeded with python version \`${PYTHON_DEFAULT}\` for \`${VCS_COMMIT_ID}\`" >> "$GITHUB_STEP_SUMMARY"
830+
else
831+
printf "%s\n" " ${FAIL_ICON} ~Style Checks succeeded with python version \`${PYTHON_DEFAULT}\`~" >> "$GITHUB_STEP_SUMMARY"
832+
fi
806833
807834
808835
INTEGRATION:
@@ -892,7 +919,9 @@ jobs:
892919
shell: bash
893920
- name: Generate Doctest Coverage for py${{ matrix.python-version }} on ${{ matrix.os }}
894921
id: integration-doctests
895-
run: make -f Makefile test-mat-doctests ;
922+
shell: bash
923+
run: |
924+
make -f Makefile test-mat-doctests ;
896925
- name: Generate Functional Test Coverage for py${{ matrix.python-version }} on ${{ matrix.os }}
897926
id: integration-main
898927
run: |

tests/check_coverage_helper

Lines changed: 3 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -83,6 +83,7 @@ umask 137
8383
export LC_CTYPE="${LC_CTYPE:-en_US.UTF-8}"
8484

8585
# Global variable to track initial directories
86+
readonly SCRIPT_FILE="tests/check_coverage_helper"
8687
readonly PRE_OLDPWD="${OLDPWD:-${PWD:-$(pwd)}}"
8788
readonly PRE_PWD="${PWD:-$(pwd)}"
8889

@@ -180,7 +181,7 @@ if [[ ("${EXIT_CODE}" -eq 0) ]] ; then
180181
TEST_CAT="${2}" ;
181182
COVERAGE_CONTEXT_STUB="${TEST_CAT:-${TEST_GROUP:-all}}" ;
182183
COVERAGE_DATA_FILE="coverage_${COVERAGE_CONTEXT_STUB}" ;
183-
COVERAGE_CONTEXT_ARGS="--context=${COVERAGE_CONTEXT_STUB} --data-file=${COVERAGE_DATA_FILE}" ;
184+
COVERAGE_CONTEXT_ARGS="--context=${COVERAGE_CONTEXT_STUB}" ;
184185
export COVERAGE_DATA_FILE
185186
if [[ -n "${PYTHON}" ]] && [[ -x "${PYTHON}" ]] ; then # e.g., check_command ${PYTHON}
186187
PY_3_CMD="${PYTHON}"
@@ -253,7 +254,7 @@ if [[ ("${EXIT_CODE}" -eq 0) ]] ; then
253254
# shellcheck disable=SC2086
254255
${PY_3_CMD} -m coverage report -m --include=multicast/* --data-file=${COVERAGE_DATA_FILE} 2>/dev/null || : ; # always continue
255256
# shellcheck disable=SC2086
256-
${PY_3_CMD} -m coverage xml -o test-reports/coverage_${TEST_CAT:-${TEST_GROUP}}.xml --include=multicast/* --data-file="${COVERAGE_DATA_FILE}" 2>/dev/null || : ; # always continue
257+
${PY_3_CMD} -m coverage xml -o test-reports/coverage_${COVERAGE_CONTEXT_STUB}.xml --include=multicast/* --data-file="${COVERAGE_DATA_FILE}" 2>/dev/null || : ; # always continue
257258
else
258259
# shellcheck disable=SC2086
259260
${PY_3_CMD} -m coverage combine --append ./coverage_* 2>/dev/null || : ; # always continue

0 commit comments

Comments
 (0)