File tree 6 files changed +63
-17040
lines changed
6 files changed +63
-17040
lines changed Original file line number Diff line number Diff line change @@ -3,9 +3,9 @@ name: Test
3
3
on :
4
4
push :
5
5
branches :
6
- - " ** "
6
+ - master
7
7
pull_request :
8
- branches :
8
+ branches :
9
9
- " **"
10
10
11
11
env :
35
35
if : steps.node_modules_cache.outputs.cache-hit != 'true'
36
36
run : npm ci
37
37
- name : Build & run tests
38
+ run : npm run test
39
+ - name : Run tests in Saucelabs
38
40
run : |
39
41
./buildtools/sauce_connect.sh &
40
- npm test -- --saucelabs
42
+ ./buildtools/run_tests.sh --saucelabs
Original file line number Diff line number Diff line change 24
24
cd " $( dirname $( dirname " $0 " ) ) "
25
25
26
26
echo " Compiling templates..."
27
- npm run build build -soy
27
+ npm run build-soy
28
28
mkdir -p ./generated
29
29
cp -r ./out/soy/* ./generated
30
- npm run build clean
31
30
32
31
echo " Generating dependency file..."
33
32
node $( npm bin) /closure-make-deps \
Original file line number Diff line number Diff line change @@ -76,19 +76,19 @@ 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
82
86
else
83
- # https://github.com/angular/webdriver-manager/issues/404
84
- echo " Updating webdriver-manager dependency."
85
- cd ./node_modules/protractor/
86
- npm i webdriver-manager@latest
87
- cd ../../
88
87
echo " Using Headless Chrome."
89
88
# Updates Selenium Webdriver.
90
- echo " $PROTRACTOR_BIN_PATH /webdriver-manager update --gecko=false"
91
- $PROTRACTOR_BIN_PATH /webdriver-manager update --gecko=false
89
+ GOOGLE_CHROME_VERSION=$( google-chrome --product-version || echo ' latest' )
90
+ echo " $PROTRACTOR_BIN_PATH /webdriver-manager update --versions.chrome $GOOGLE_CHROME_VERSION --gecko=false"
91
+ $PROTRACTOR_BIN_PATH /webdriver-manager update --versions.chrome $GOOGLE_CHROME_VERSION --gecko=false
92
92
# Start Selenium Webdriver.
93
93
echo " $PROTRACTOR_BIN_PATH /webdriver-manager start &>/dev/null &"
94
94
$PROTRACTOR_BIN_PATH /webdriver-manager start & > /dev/null &
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