remix-project mirror
You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
remix-project/ci/browser_tests.sh

48 lines
1.3 KiB

8 years ago
#!/usr/bin/env bash
8 years ago
set -e
8 years ago
setupRemixd () {
mkdir remixdSharedfolder
cd contracts
8 years ago
echo 'sharing folder: '
echo $PWD
node ../node_modules/remixd/src/main.js -s $PWD &
8 years ago
cd ..
}
SC_VERSION="4.4.0"
SAUCECONNECT_URL="https://saucelabs.com/downloads/sc-$SC_VERSION-linux.tar.gz"
8 years ago
SAUCECONNECT_USERNAME="chriseth"
SAUCECONNECT_ACCESSKEY="b781828a-9e9c-43d8-89d4-2fbb879595ca"
BUILD_ID=${CIRCLE_BUILD_NUM:-${TRAVIS_JOB_NUMBER}}
echo "$BUILD_ID"
SAUCECONNECT_JOBIDENTIFIER="browsersolidity_tests_${BUILD_ID}"
8 years ago
SAUCECONNECT_READYFILE="sc.ready"
TEST_EXITCODE=0
npm run serve &
8 years ago
setupRemixd
wget "$SAUCECONNECT_URL"
tar -zxvf sc-"$SC_VERSION"-linux.tar.gz
8 years ago
./sc-"$SC_VERSION"-linux/bin/sc -u "$SAUCECONNECT_USERNAME" -k "$SAUCECONNECT_ACCESSKEY" -i "$SAUCECONNECT_JOBIDENTIFIER" --no-ssl-bump-domains all --readyfile "$SAUCECONNECT_READYFILE" &
while [ ! -f "$SAUCECONNECT_READYFILE" ]; do
8 years ago
sleep .5
done
npm run nightwatch_remote_chrome || TEST_EXITCODE=1
npm run nightwatch_remote_firefox || TEST_EXITCODE=1
npm run nightwatch_remote_safari || TEST_EXITCODE=1
# npm run nightwatch_remote_ie || TEST_EXITCODE=1
# npm run nightwatch_remote_parallel || TEST_EXITCODE=1
8 years ago
node ci/sauceDisconnect.js "$SAUCECONNECT_USERNAME" "$SAUCECONNECT_ACCESSKEY" "$SAUCECONNECT_JOBIDENTIFIER"
8 years ago
echo "$TEST_EXITCODE"
if [ "$TEST_EXITCODE" -eq 1 ]
8 years ago
then
exit 1
fi