File tree 3 files changed +24
-8
lines changed
3 files changed +24
-8
lines changed Original file line number Diff line number Diff line change @@ -33,11 +33,10 @@ jobs:
33
33
${{ runner.os }}-14-node_modules-
34
34
- name : NPM install
35
35
if : steps.node_modules_cache.outputs.cache-hit != 'true'
36
- # Start sauce connect here, so it's ready to go by the time we need it
37
- run : |
38
- npm ci
39
- ./buildtools/sauce_connect.sh &
36
+ run : npm ci
40
37
- name : Build & run tests
41
38
run : npm run test
42
39
- name : Run tests in Saucelabs
43
- run : ./buildtools/run_tests.sh --saucelabs
40
+ run : |
41
+ ./buildtools/sauce_connect.sh &
42
+ ./buildtools/run_tests.sh --saucelabs
Original file line number Diff line number Diff line change @@ -76,6 +76,10 @@ if [[ $1 = "--saucelabs" ]]; then
76
76
seleniumStarted=false
77
77
sleep 2
78
78
echo " Using SauceLabs."
79
+ until [ -f ' /tmp/sauce-connect-ready' ]
80
+ do
81
+ sleep 2
82
+ done
79
83
# $2 contains the tunnelIdentifier argument if specified, otherwise is empty.
80
84
$PROTRACTOR_BIN_PATH /protractor protractor.conf.js --saucelabs $2
81
85
fi
Original file line number Diff line number Diff line change 22
22
#
23
23
24
24
# Setup and start Sauce Connect locally.
25
- CONNECT_URL=" https://saucelabs.com/downloads/sc-4.6.5-linux.tar.gz"
25
+ if [[ $OSTYPE == ' darwin' * ]]; then
26
+ CONNECT_URL=" https://saucelabs.com/downloads/sc-4.7.1-osx.zip"
27
+ else
28
+ CONNECT_URL=" https://saucelabs.com/downloads/sc-4.7.1-linux.tar.gz"
29
+ fi
26
30
CONNECT_DIR=" /tmp/sauce-connect-$RANDOM "
27
31
CONNECT_DOWNLOAD=" sc-latest-linux.tar.gz"
28
32
@@ -33,8 +37,17 @@ mkdir -p $CONNECT_DIR
33
37
cd $CONNECT_DIR
34
38
curl $CONNECT_URL -o $CONNECT_DOWNLOAD 2> /dev/null 1> /dev/null
35
39
mkdir sauce-connect
36
- tar --extract --file=$CONNECT_DOWNLOAD --strip-components=1 \
40
+
41
+ if [[ $OSTYPE == ' darwin' * ]]; then
42
+ unzip -d sauce-connect $CONNECT_DOWNLOAD &&
43
+ f=(sauce-connect/* ) &&
44
+ mv sauce-connect/* /* sauce-connect &&
45
+ rmdir " ${f[@]} "
46
+ else
47
+ tar --extract --file=$CONNECT_DOWNLOAD --strip-components=1 \
37
48
--directory=sauce-connect > /dev/null
49
+ fi
50
+
38
51
rm $CONNECT_DOWNLOAD
39
52
40
53
function removeFiles() {
@@ -63,4 +76,4 @@ echo "Starting Sauce Connect..."
63
76
64
77
# Start SauceConnect.
65
78
sauce-connect/bin/sc -u $SAUCE_USERNAME -k $SAUCE_ACCESS_KEY \
66
- -i $TUNNEL_IDENTIFIER
79
+ -i $TUNNEL_IDENTIFIER -f $BROWSER_PROVIDER_READY_FILE
You can’t perform that action at this time.
0 commit comments