File tree 2 files changed +30
-8
lines changed
2 files changed +30
-8
lines changed Original file line number Diff line number Diff line change 22
22
23
23
env :
24
24
EASYRSA_REMOTE_CI : 1
25
+ EASYRSA_NIX : 1
25
26
TERM : xterm-256color
26
27
27
28
# Steps represent a sequence of tasks that will be executed as part of the job
30
31
- uses : actions/checkout@v2
31
32
32
33
# Runs a single command using the runners shell
33
- - name : shellcheck test
34
- run : shellcheck -V
35
- # run: shellcheck easyrsa3/easyrsa
36
34
- name : operational test
37
35
run : sh op_test.sh -v
38
36
49
47
50
48
env :
51
49
EASYRSA_REMOTE_CI : 1
50
+ EASYRSA_WIN : 1
52
51
TERM : xterm-256color
53
52
54
53
# Steps represent a sequence of tasks that will be executed as part of the job
Original file line number Diff line number Diff line change 4
4
# and executes that - allows for disconnected testing from the easy-rsa
5
5
# repo with TravisCI.
6
6
7
+ github_url=' https://raw.githubusercontent.com'
8
+
9
+ if [ -e " shellcheck" ] && [ " $EASYRSA_NIX " ]; then
10
+ chmod +x shellcheck
11
+ ./shellcheck -V
12
+ ./shellcheck easyrsa3/easyrsa
13
+ elif [ " $EASYRSA_NIX " ]; then
14
+ github_target=' OpenVPN/easyrsa-unit-tests/master/shellcheck'
15
+ curl -O " ${github_url} /${github_target} "
16
+ [ -e " shellcheck" ] || { echo " shellcheck download failed." ; exit 9; }
17
+ chmod +x shellcheck
18
+ ./shellcheck -V
19
+ ./shellcheck easyrsa3/easyrsa
20
+ rm -f ./shellcheck
21
+ fi
22
+
7
23
case " $1 " in
8
24
-v) verb=' -v' ;;
9
25
-vv) verb=' -vv' ;;
13
29
estat=0
14
30
15
31
if [ -e " easyrsa-unit-tests.sh" ]; then
16
- sh easyrsa-unit-tests.sh " $verb "
17
- estat=$?
32
+ if sh easyrsa-unit-tests.sh " $verb " ; then
33
+ : # ok
34
+ else
35
+ estat=1
36
+ fi
18
37
else
19
- curl -O ' https://raw.githubusercontent.com/OpenVPN/easyrsa-unit-tests/master/easyrsa-unit-tests.sh'
38
+ github_target=' OpenVPN/easyrsa-unit-tests/master/easyrsa-unit-tests.sh'
39
+ curl -O " ${github_url} /${github_target} "
20
40
[ -e " easyrsa-unit-tests.sh" ] || { echo " Unit-test download failed." ; exit 9; }
21
- sh easyrsa-unit-tests.sh " $verb "
22
- estat=$?
41
+ if sh easyrsa-unit-tests.sh " $verb " ; then
42
+ : # ok
43
+ else
44
+ estat=1
45
+ fi
23
46
rm -f easyrsa-unit-tests.sh
24
47
fi
25
48
You can’t perform that action at this time.
0 commit comments