Skip to content

Commit 57f5592

Browse files
[CONFIG] Apply changes as found in review (- WIP PR #402 -)
* these changes are related to cleaning up GHI #338 Changes in file .github/actions/run-minimal-acceptance-tests/action.yml: * cleaned up a little * related work Changes in file .github/actions/setup-py-reqs/action.yml: * cleaned up a bunch and added comments * related work Changes in file .github/workflows/CI-DOCS.yml: * fixed a few missed values * related work Changes in file .github/workflows/Tests.yml: * related work Changes in file tests/check_spelling: * related work
1 parent d6de790 commit 57f5592

File tree

5 files changed

+35
-16
lines changed

5 files changed

+35
-16
lines changed

.github/actions/run-minimal-acceptance-tests/action.yml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -91,7 +91,7 @@ runs:
9191
PYTHON_VERSION_INPUT: ${{ inputs.python-version }}
9292
shell: bash
9393
run: |
94-
if [[ -z $PYTHON_VERSION_INPUT ]]; then
94+
if [[ -n $PYTHON_VERSION_INPUT ]]; then
9595
printf "python-version=%s\n" "${PYTHON_VERSION_INPUT}" >> "$GITHUB_OUTPUT"
9696
PYTHON_VERSION=${PYTHON_VERSION_INPUT}
9797
else

.github/actions/setup-py-reqs/action.yml

Lines changed: 21 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -76,7 +76,7 @@ runs:
7676
PYTHON_VERSION_INPUT: ${{ inputs.python-version }}
7777
shell: bash
7878
run: |
79-
if [[ -z $PYTHON_VERSION_INPUT ]]; then
79+
if [[ -n $PYTHON_VERSION_INPUT ]]; then
8080
printf "python-version=%s\n" "${PYTHON_VERSION_INPUT}" >> "$GITHUB_OUTPUT"
8181
PYTHON_VERSION=${PYTHON_VERSION_INPUT}
8282
else
@@ -88,8 +88,13 @@ runs:
8888
if: ${{ !cancelled() }}
8989
shell: bash
9090
run: |
91-
printf "artifact-name=%s\n" multicast-deps-${{ steps.output_sha.outputs.sha }}-part-$(uuidgen) >> "$GITHUB_OUTPUT"
92-
printf "%s\n" "DEPS_STEP_SUMMARY=Dependencies-Summary-Artifact-${PYTHON_VERSION}.txt" >> "$GITHUB_ENV"
91+
if [[ ${{ runner.os }} != 'Windows' ]] ; then
92+
printf "artifact-name=%s\n" multicast-integration-${BUILD_SHA}-part-$(uuidgen) >> "$GITHUB_OUTPUT"
93+
else
94+
printf "artifact-name=%s" multicast-integration-${BUILD_SHA}-part- >> "$GITHUB_OUTPUT"
95+
printf "%04x%04x-%04x-%04x-%04x-%04x%04x%04x\n" $RANDOM $RANDOM $RANDOM $(($RANDOM & 0x0fff | 0x4000)) $(($RANDOM & 0x3fff | 0x8000)) $RANDOM $RANDOM $RANDOM >> "$GITHUB_OUTPUT"
96+
fi
97+
printf "%s\n" "DEPS_STEP_SUMMARY=Dependencies-Summary-Artifact-${{ runner.os }}-${PYTHON_VERSION}.txt" >> "$GITHUB_ENV"
9398
- name: "Install Build Dependencies"
9499
id: install_build_requirements
95100
if: ${{ !cancelled() }}
@@ -121,30 +126,42 @@ runs:
121126
run: |
122127
if [[ "${{ steps.install_build_requirements.outcome }}" != "failure" ]] ; then
123128
if [[ ( -r requirements.txt ) ]] ; then
129+
# Initialize result as success b/c nothing failed ... yet
124130
THE_RESULT="success"
125131
else
132+
# Initialize result as skipped b/c nothing could be done without requirements.txt
126133
THE_RESULT="skipped"
127134
fi
128135
else
136+
# Initialize result as failure right away
129137
THE_RESULT="failure"
130138
fi
131139
if [[ "${{ steps.install_test_requirements.outcome }}" == "success" && "${THE_RESULT}" == "success" ]] ; then
140+
# keep result as success b/c something succeeded and nothing failed ... yet
132141
THE_RESULT="success"
133142
else
143+
# check for actual failure
134144
if [[ "${{ steps.install_test_requirements.outcome }}" == "failure" ]] ; then
145+
# force result as failure b/c something failed
135146
THE_RESULT="failure"
136147
fi
137148
fi
138149
if [[ "${{ steps.install_docs_requirements.outcome }}" == "success" && "${THE_RESULT}" == "success" ]] ; then
150+
# keep result as success b/c something succeeded and nothing failed ... at all
139151
THE_RESULT="success"
140152
else
153+
# check for actual failure
141154
if [[ "${{ steps.install_docs_requirements.outcome }}" == "failure" ]] ; then
155+
# force result as failure b/c something failed
142156
THE_RESULT="failure"
143157
fi
144158
fi
159+
# hint to help with debugging
160+
printf "::debug:: %s\n" "The result of dependency evaluation: ${THE_RESULT}"
145161
if [[ "${THE_RESULT}" == "success" ]] ; then
146162
exit 0
147163
else
164+
# exit as failure b/c either a soft-fail (skip/cancelled/etc.) or actual failure
148165
exit 1
149166
fi
150167
- name: "Summarize DEPs"
@@ -191,6 +208,7 @@ runs:
191208
printf "%s\n" "DEPS summary files found:"
192209
printf "%s\n" "$FILES"
193210
mkdir DEPS || :
211+
printf "%s\n" "$FILES" | xargs -I{} mv -f "{}" "DEPS/{}" || :
194212
# Replace line breaks with spaces for GitHub Action Output
195213
FILES="${FILES//$'\n'/ }"
196214
printf "%s\n" "files=$FILES" >> "$GITHUB_OUTPUT"

.github/workflows/CI-DOCS.yml

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -217,7 +217,7 @@ jobs:
217217
BUILD_SHA: ${{ needs.check_mats.outputs.build_sha }}
218218
DOCUMENTATION_COMMENT_BODY: '${{ github.workspace }}/DOCUMENTATION-Summary-Artifact.txt'
219219
run: |
220-
if [[ "${{ needs.COVERAGE.outputs.coverage_outcome }}" == "success" ]]; then
220+
if [[ "${{ needs.DOCS.outputs.docs_outcome }}" == "success" ]]; then
221221
printf "%s\n\n" "# :book: Documentation Summary" > "${DOCUMENTATION_COMMENT_BODY}"
222222
printf "%s\n" " * :ballot_box_with_check: Generating Documentation Passed" >> "${DOCUMENTATION_COMMENT_BODY}"
223223
printf "%s\n" "documentation_success=true" >> "$GITHUB_OUTPUT"
@@ -268,7 +268,7 @@ jobs:
268268
check-id: ${{ needs.check_mats.outputs.check_id }}
269269
title: "Documentation Testing"
270270
status: 'completed'
271-
conclusion: ${{ needs.COVERAGE.outputs.coverage_outcome }}
271+
conclusion: ${{ needs.DOCS.outputs.docs_outcome }}
272272
summary: ${{ steps.report_status.outputs.docs_summary }}
273273
text: ${{ steps.report_status.outputs.docs_text }}
274274
sha: ${{ needs.check_mats.outputs.build_sha }}

.github/workflows/Tests.yml

Lines changed: 10 additions & 10 deletions
Original file line numberDiff line numberDiff line change
@@ -389,7 +389,7 @@ jobs:
389389
SCRIPT_NAME: ".github/actions/run-coverage-tests/action.yml"
390390
shell: bash
391391
run: |
392-
FILES=$(git ls-files -o --exclude-standard -- ${{ env.MATS_MATCH_PATTERN }} )
392+
FILES=$(git ls-files -o --exclude-standard -- ${{ env.COV_MATCH_PATTERN }} )
393393
if [ -z "$FILES" ]; then
394394
printf "::warning file=%s:: %s\n" "${SCRIPT_NAME}" "No summary files found."
395395
printf "%s\n" "files=" >> "$GITHUB_OUTPUT"
@@ -797,7 +797,7 @@ jobs:
797797
persist-credentials: false
798798
ref: ${{ needs.check_mats.outputs.build_sha }}
799799
sparse-checkout: '.github/actions/checkout-and-rebuild'
800-
- name: Checkout repository for Style with ${{ matrix.python-version }}
800+
- name: "Checkout repository for Style with ${{ vars.PYTHON_DEFAULT }}"
801801
id: fetch-build
802802
uses: ./.github/actions/checkout-and-rebuild
803803
with:
@@ -860,7 +860,7 @@ jobs:
860860
CC_TEST_REPORTER_ID: ${{ secrets.CC_TEST_REPORTER_ID }}
861861
outputs:
862862
integration_outcome: ${{ steps.integration_outcome.outcome }}
863-
integration_test_outcome: ${{ steps.integration_tests.integration_test_outcome }}
863+
integration_test_outcome: ${{ steps.integration_tests.outputs.integration_test_outcome }}
864864
integration_pytest_outcome: ${{ steps.integration-pytest.outcome }}
865865
integration_doctest_outcome: ${{ steps.integration-doctests.outcome }}
866866
integration_function_outcome: ${{ steps.integration-main.outcome }}
@@ -1231,15 +1231,15 @@ jobs:
12311231
TESTS_COMMENT_BODY: '${{ github.workspace }}/Integration-Summary-Artifact.txt'
12321232
run: |
12331233
if [[ "${{ needs.INTEGRATION.outputs.integration_outcome }}" == "success" ]]; then
1234-
printf "%s\n" "# :open_umbrella: Code Coverage Summary" > "${TESTS_COMMENT_BODY}"
1235-
printf "%s\n" "coverage_success=true" >> "$GITHUB_OUTPUT"
1236-
printf "%s\n" "tests_summary=Coverage Tests Passed" >> "$GITHUB_OUTPUT"
1234+
printf "%s\n" "# :clipboard: Testing Summary" > "${TESTS_COMMENT_BODY}"
1235+
printf "%s\n" "test_success=true" >> "$GITHUB_OUTPUT"
1236+
printf "%s\n" "tests_summary=CI Tests Passed" >> "$GITHUB_OUTPUT"
12371237
else
12381238
printf "%s\n\n" "# Known flaws." > "${TESTS_COMMENT_BODY}"
12391239
printf "%s\n" "> [!WARNING]" >> "${TESTS_COMMENT_BODY}"
12401240
printf "%s\n\n" "> This commit has known flaws. Each commit is subject to minimal acceptance testing, and then select commits are subject to extra testing to evaluate release candidates; This commit has been deemed _not ready_ for release." >> "${TESTS_COMMENT_BODY}"
1241-
printf "%s\n" "coverage_success=false" >> "$GITHUB_OUTPUT"
1242-
printf "%s\n" "tests_summary=Coverage Tests Unsuccessful" >> "$GITHUB_OUTPUT"
1241+
printf "%s\n" "test_success=false" >> "$GITHUB_OUTPUT"
1242+
printf "%s\n" "tests_summary=Some Tests Unsuccessful" >> "$GITHUB_OUTPUT"
12431243
fi
12441244
for OS_TAG in "Linux" "macOS" "Windows" ; do
12451245
for TYPE_TAG in "Integration" ; do
@@ -1273,8 +1273,8 @@ jobs:
12731273
persist-credentials: false
12741274
ref: ${{ needs.check_mats.outputs.build_sha }}
12751275
sparse-checkout: '.github/actions/check-control'
1276-
- name: "Compleate Tests GitHub Check"
1277-
id: compleate_tests
1276+
- name: "Complete Tests GitHub Check"
1277+
id: complete_tests
12781278
if: ${{ (github.repository == 'reactive-firewall/multicast') && always() }}
12791279
uses: ./.github/actions/check-control
12801280
with:

tests/check_spelling

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -154,6 +154,7 @@ declare -a SPECIFIC_TYPOS=(
154154
"boundry:boundary" # from #384
155155
"rappidly:rapidly" # from #392
156156
"compleated:completed" # from #338
157+
"compleate:complete" # from #402
157158
)
158159

159160
function cleanup() {

0 commit comments

Comments
 (0)