Skip to content

Navigation Menu

Sign in
Appearance settings

Search code, repositories, users, issues, pull requests...

Provide feedback

We read every piece of feedback, and take your input very seriously.

Saved searches

Use saved searches to filter your results more quickly

Sign up
Appearance settings

Commit e50122e

Browse files
committed
GitHub Actions "annotations" feature doesn't work with colour output
1 parent d8dc8a7 commit e50122e

File tree

1 file changed

+12
-9
lines changed

1 file changed

+12
-9
lines changed

‎dev/do/test-indent

Lines changed: 12 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -10,13 +10,14 @@ C_YELLOW='033円[1;33m'
1010
C_BLUE='033円[1;34m'
1111
C_RESET='033円[0m'
1212

13-
log() { printf "$*$C_RESET\n"; }
14-
logc() { log "1ドル2ドル"; }
15-
succ() { logc "$C_GREEN" "$*"; }
16-
warn() { logc "$C_YELLOW" "$*"; }
17-
err() { logc "$C_RED" "$*"; }
18-
info() { logc "$C_BLUE" "$*"; }
19-
abort() { err "ABORT: $*"; exit 1; }
13+
log() { printf "$*$C_RESET\n"; }
14+
logc() { log "1ドル2ドル"; }
15+
succ() { logc "$C_GREEN" "$*"; }
16+
warn() { logc "$C_YELLOW" "$*"; }
17+
err() { logc "$C_RED" "$*"; }
18+
info() { logc "$C_BLUE" "$*"; }
19+
abort() { err "ABORT: $*"; exit 1; }
20+
gh_do() { [ -n "$GITHUB_ACTIONS" ] && return 0 || return 1; }
2021

2122
pushd "$(dirname "0ドル")/.."
2223

@@ -39,11 +40,13 @@ test_case_dir='tests'
3940
test_pass() { PASSED+=("1ドル"); }
4041
test_fail() {
4142
FAILED+=("1ドル")
42-
err "::error file=dev/$test_case_dir/1ドル/out.clj::Failed indent test case."
43+
gh_do && echo "::error file=dev/$test_case_dir/1ドル/out.clj::Failed indent test case."
44+
err "Failed \"1ドル\""
4345
}
4446
test_skip() {
4547
SKIPPED+=("1ドル")
46-
warn "::warning file=dev/$test_case_dir/1ドル/out.clj::Skipped indent test case."
48+
gh_do && echo "::warning file=dev/$test_case_dir/1ドル/out.clj::Skipped indent test case."
49+
warn "Skipped \"1ドル\""
4750
}
4851

4952
run_test_case() {

0 commit comments

Comments
(0)

AltStyle によって変換されたページ (->オリジナル) /