Skip to content

Commit

Permalink
Debugging
Browse files Browse the repository at this point in the history
  • Loading branch information
h-0-0 committed Dec 3, 2023
1 parent c80ee53 commit b986c95
Showing 1 changed file with 12 additions and 14 deletions.
26 changes: 12 additions & 14 deletions .github/workflows/tests_macos.yml
Original file line number Diff line number Diff line change
Expand Up @@ -6,9 +6,6 @@ on:
pull_request:
branches: [ "main" ]

env:
TEST_RESULTS: ()

jobs:
build:

Expand Down Expand Up @@ -44,12 +41,10 @@ jobs:
run: |
cd $GITHUB_WORKSPACE
python -m pytest
echo $TEST_RESULTS
echo ${TEST_RESULTS}
if [ $? -eq 0 ]; then
${TEST_RESULTS}=("${TEST_RESULTS[@]}" "true")
echo "true" >> results.txt
else
${TEST_RESULTS}=("${TEST_RESULTS[@]}" "false")
echo "false" >> results.txt
fi
create-badge:
Expand All @@ -59,14 +54,17 @@ jobs:
- name: Determine overall badge color
id: determine-color
run: |
overall_status="passed"
for i in "${TEST_RESULTS[@]}"; do
echo "Test result: $i"
if [ "$i" != "true" ]; then
overall_status="failed"
break
overall_status="passed"
RESULTS=$(cat results.txt)
# Loop through each line in the file
while IFS= read -r line; do
echo "Processing result: $line"
if [[ "$line" == *"false"* ]]; then
echo "Setting overall_status to failed"
overall_status=failed
fi
done
done < results.txt
echo "::set-output name=overall_status::${overall_status}"
echo "COVERAGE=${overall_status}"
Expand Down

0 comments on commit b986c95

Please sign in to comment.