Skip to content

Commit 71beb20

Browse files
committed
test: is_github_actions()
1 parent 77a0419 commit 71beb20

File tree

1 file changed

+27
-0
lines changed

1 file changed

+27
-0
lines changed

test/is_github_actions.bats

+27
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,27 @@
1+
# SPDX-License-Identifier: GPL-3.0-or-later
2+
3+
setup_file () {
4+
load 'test_helper/common-setup'
5+
_common_setup
6+
}
7+
8+
setup () {
9+
load 'test_helper/bats-assert/load'
10+
load 'test_helper/bats-support/load'
11+
}
12+
13+
@test "is_github_actions()" {
14+
source "${PROJECT_ROOT}/src/functions.sh"
15+
16+
run is_github_actions
17+
assert_failure 1
18+
19+
GITHUB_ACTIONS="1"
20+
run is_github_actions
21+
assert_success
22+
}
23+
24+
teardown () {
25+
export \
26+
GITHUB_ACTIONS=""
27+
}

0 commit comments

Comments
 (0)