File tree Expand file tree Collapse file tree 1 file changed +15
-8
lines changed Expand file tree Collapse file tree 1 file changed +15
-8
lines changed Original file line number Diff line number Diff line change @@ -39,15 +39,22 @@ jobs:
3939 shell : bash
4040 run : |
4141 # Parse stubsabot.py output to find stubs that should be tested.
42- set -o pipefail
4342 exec 5>&1
44- STUBS=$(script -qfc "GITHUB_TOKEN=${{ secrets.GITHUB_TOKEN }} python scripts/stubsabot.py --action-level nothing" /dev/null \
45- | tee >(cat - >&5) \
46- | sed -r "s/\x1B\[[0-9;]*[mK]//g" \
47- | grep 'should be tested by stubsabot' \
48- | awk '{print $1}' \
49- | xargs)
50- exit_code=$?
43+ EXIT_FILE=$(mktemp)
44+ STUBS_FILE=$(mktemp)
45+ script -q /dev/null -c '
46+ python scripts/stubsabot.py --action-level nothing
47+ echo $? > '"$EXIT_FILE"'
48+ ' 2>&1 | while IFS= read -r line; do
49+ echo "$line" >&5
50+ clean=$(echo "$line" | sed -r "s/\x1B\[[0-9;]*[mK]//g")
51+ if [[ $clean == *"should be tested by stubsabot"* ]]; then
52+ echo "${clean%% *}" >> "$STUBS_FILE"
53+ fi
54+ done
55+ exit_code=$(cat "$EXIT_FILE")
56+ STUBS=$(xargs < "$STUBS_FILE")
57+ rm "$EXIT_FILE" "$STUBS_FILE"
5158 echo "STUBS=$STUBS" >> $GITHUB_OUTPUT
5259 exit $exit_code
5360
You can’t perform that action at this time.
0 commit comments