forked from fhoeben/hsac-fitnesse-fixtures
-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathtravis_build_and_test.sh
executable file
·21 lines (16 loc) · 1.01 KB
/
travis_build_and_test.sh
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
#!/bin/bash
# stop script on non-zero exit code by command
set -e
if [ "${TEST_TYPE}" == "acceptance-test" ]; then
if [ "${TRAVIS_PULL_REQUEST}" == "false" -a "${TRAVIS_BRANCH}" == "master" ]; then
echo -e "Create standalone.zip\n"
mvn package -DskipTests
fi
echo -e "Run acceptance test using Headless Chrome on Travis server\n"
mvn -DseleniumBrowser=chrome "-DseleniumJsonProfile={'args':['headless', 'disable-gpu']}" test
./travis_publish_results.sh target/fitnesse-results acceptance-test-results
elif [ "${TEST_TYPE}" == "examples" -a "${TRAVIS_PULL_REQUEST}" == "false" -a "${TRAVIS_BRANCH}" == "master" ]; then
echo -e "Run examples via SauceLabs\n"
mvn -DfitnesseSuiteToRun=HsacExamples -DseleniumGridUrl=http://${SAUCE_USERNAME}:${SAUCE_ACCESS_KEY}@ondemand.saucelabs.com:80/wd/hub -DseleniumCapabilities="${CAPA},name:Travis ${TRAVIS_BUILD_NUMBER}-examples,build:$TRAVIS_BUILD_NUMBER" test-compile failsafe:integration-test
./travis_publish_results.sh target/fitnesse-results examples-results
fi