Skip to content

Commit dbb14a2

Browse files
committed
Jiggle the test
Signed-off-by: Raven Black <ravenblack@dropbox.com>
1 parent afbeef3 commit dbb14a2

1 file changed

Lines changed: 14 additions & 7 deletions

File tree

‎actions/github/run/tests/annotate.test.yml‎

Lines changed: 14 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -4,10 +4,16 @@ uses: ./actions/github/run
44
id: run
55
with:
66
command: bash
7-
args: >-
8-
-c
9-
printf '%s\n' 'ordinary output' 'INFO: Build completed, 2 tests FAILED, 26020 total actions'
7+
args: ${{ runner.temp }}/run-annotation-test.sh
108
error-match: FAILED
9+
source: |
10+
cat > "$RUNNER_TEMP/run-annotation-test.sh" <<'EOF'
11+
#!/usr/bin/env bash
12+
printf '%s\n' \
13+
'ordinary output' \
14+
'INFO: Build completed, 2 tests FAILED, 26020 total actions' >&2
15+
EOF
16+
chmod +x "$RUNNER_TEMP/run-annotation-test.sh"
1117
1218
after:
1319
- shell: bash
@@ -16,10 +22,11 @@ after:
1622
trap 'rm -f "$TMP_STDERR"' EXIT
1723
export TMP_STDERR
1824
export TOOLSHED_ERROR_MATCH=FAILED
19-
actual="$(printf '%s\n' \
20-
'ordinary output' \
21-
'INFO: Build completed, 2 tests FAILED, 26020 total actions' \
22-
| "${ACTION_TEST_PATH}/../annotate.sh" "$TMP_STDERR")"
25+
actual="$(
26+
{
27+
printf '%s\n' 'ordinary output' 'INFO: Build completed, 2 tests FAILED, 26020 total actions' >&2
28+
} 2>&1 | "${ACTION_TEST_PATH}/../annotate.sh" "$TMP_STDERR"
29+
)"
2330
expected=$'ordinary output\nINFO: Build completed, 2 tests FAILED, 26020 total actions\n::error::INFO: Build completed, 2 tests FAILED, 26020 total actions'
2431
if [[ "$actual" != "$expected" ]]; then
2532
echo "Unexpected streamed annotation output:"

0 commit comments

Comments
 (0)