99 - name : Checkout
1010 uses : actions/checkout@v2
1111
12- - name : Set non-interactive
13- run : |
14- export DEBIAN_FRONTEND=noninteractive
15- export DEBCONF_NONINTERACTIVE_SEEN=true
16-
1712 - name : Test swiftbox version
1813 run : |
1914 chmod +x swiftbox.sh
@@ -97,23 +92,29 @@ jobs:
9792 - name : Checkout
9893 uses : actions/checkout@v2
9994
100- - name : Set non-interactive
101- run : |
102- echo "::set-env name=DEBIAN_FRONTEND:noninteractive"
103- echo "::set-env name=DEBCONF_NONINTERACTIVE_SEEN:true"
104-
10595 - name : Test swiftbox version
10696 run : |
10797 chmod +x swiftbox.sh
10898 ./swiftbox.sh version
10999
110100 - name : Test swiftbox get nightly
101+ env :
102+ DEBIAN_FRONTEND : noninteractive
103+ DEBCONF_NONINTERACTIVE_SEEN : true
111104 run : ./swiftbox.sh get nightly
112105
113106 - name : Test Swift status
107+ shell : bash
114108 run : |
115109 source /etc/environment
116- source $HOME/.swiftbox/env.sh
110+ if [ -f $HOME/.swiftbox/env.sh ]
111+ then
112+ source $HOME/.swiftbox/env.sh
113+ fi
114+ if [ -f /opt/swiftbox/env.sh ]
115+ then
116+ source /opt/swiftbox/env.sh
117+ fi
117118 echo "\$PATH=$PATH"
118119 ./swiftbox.sh list
119120 which swift
@@ -170,7 +171,14 @@ jobs:
170171
171172 - name : Test Swift compiler
172173 run : |
173- source /etc/environment
174- source $HOME/.swiftbox/env.sh
174+ source /etc/environment
175+ if [ -f $HOME/.swiftbox/env.sh ]
176+ then
177+ source $HOME/.swiftbox/env.sh
178+ fi
179+ if [ -f /opt/swiftbox/env.sh ]
180+ then
181+ source /opt/swiftbox/env.sh
182+ fi
175183 swift test.swift
176184 swiftc test.swift -o test && ./test
0 commit comments