mirror of
https://github.com/Alfresco/alfresco-ng2-components.git
synced 2025-07-24 17:32:15 +00:00
Improve build stages (#3744)
* travis precache * rb change * remove ut * add cache warm up * Prepare cache fix * add test * use env variabble to tag * use env to label stages * move lint step at start * use dist for e2e * upload dist in alfresco * modify permissions * travis script node * remove polyfills * revert some changes * fix demo shell run test * solve download * revert debatable gallery change
This commit is contained in:
@@ -4,6 +4,8 @@ DIR="$( cd "$( dirname "${BASH_SOURCE[0]}" )" && pwd )"
|
||||
cd "$DIR/../"
|
||||
BROWSER_RUN=false
|
||||
DEVELOPMENT=false
|
||||
EXECLINT=true
|
||||
LITESERVER=false
|
||||
|
||||
show_help() {
|
||||
echo "Usage: ./scripts/test-e2e-lib.sh -host adf.domain.com -u admin -p admin -e admin"
|
||||
@@ -20,6 +22,7 @@ show_help() {
|
||||
echo "-host or --host URL of the Front end to test"
|
||||
echo "-save save the error screenshot in the remote env"
|
||||
echo "-timeout or --timeout override the timeout foe the wait utils"
|
||||
echo "-sl --skip-lint skip lint"
|
||||
echo "-h or --help"
|
||||
}
|
||||
|
||||
@@ -70,6 +73,14 @@ set_selenium(){
|
||||
SELENIUM_SERVER=$1
|
||||
}
|
||||
|
||||
skip_lint(){
|
||||
EXECLINT=false
|
||||
}
|
||||
|
||||
lite_server(){
|
||||
LITESERVER=true
|
||||
}
|
||||
|
||||
while [[ $1 == -* ]]; do
|
||||
case "$1" in
|
||||
-h|--help|-\?) show_help; exit 0;;
|
||||
@@ -81,10 +92,12 @@ while [[ $1 == -* ]]; do
|
||||
-b|--browser) set_browser; shift;;
|
||||
-dev|--dev) set_development; shift;;
|
||||
-s|--spec) set_test $2; shift 2;;
|
||||
-ud|--use-dist) lite_server; shift;;
|
||||
-save) set_save_screenshot; shift;;
|
||||
-proxy|--proxy) set_proxy $2; shift 2;;
|
||||
-s|--seleniumServer) set_selenium $2; shift 2;;
|
||||
-host|--host) set_host $2; shift 2;;
|
||||
-sl|--skip-lint) skip_lint; shift;;
|
||||
-*) echo "invalid option: $1" 1>&2; show_help; exit 1;;
|
||||
esac
|
||||
done
|
||||
@@ -104,14 +117,22 @@ export FOLDER=$FOLDER'/'
|
||||
export SELENIUM_SERVER=$SELENIUM_SERVER
|
||||
export NAME_TEST=$NAME_TEST
|
||||
|
||||
npm run lint-e2e || exit 1
|
||||
if [[ EXECLINT == "true" ]]; then
|
||||
npm run lint-e2e || exit 1
|
||||
fi
|
||||
|
||||
if [[ $DEVELOPMENT == "true" ]]; then
|
||||
echo "====== Run against local development ====="
|
||||
echo "====== Run against local development ====="
|
||||
npm run e2e-lib || exit 1
|
||||
else
|
||||
webdriver-manager update --gecko=false --versions.chrome=2.38
|
||||
./node_modules/protractor/bin/protractor protractor.conf.js || exit 1
|
||||
webdriver-manager update --gecko=false --versions.chrome=2.38
|
||||
if [[ $LITESERVER == "true" ]]; then
|
||||
echo "====== Run dist in lite-server ====="
|
||||
ls demo-shell/dist
|
||||
npm run lite-server-e2e>/dev/null & ./node_modules/protractor/bin/protractor protractor.conf.js || exit 1
|
||||
else
|
||||
./node_modules/protractor/bin/protractor protractor.conf.js || exit 1
|
||||
fi
|
||||
fi
|
||||
|
||||
|
||||
|
Reference in New Issue
Block a user