Skip to content
This repository was archived by the owner on Apr 12, 2024. It is now read-only.

Chore travis split unit #16292

Merged
merged 1 commit into from
Oct 23, 2017
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
5 changes: 3 additions & 2 deletions .travis.yml
Original file line number Diff line number Diff line change
Expand Up @@ -15,8 +15,9 @@ branches:
env:
matrix:
- JOB=ci-checks
- JOB=unit BROWSER_PROVIDER=saucelabs
- JOB=docs-e2e BROWSER_PROVIDER=saucelabs
- JOB=unit-core BROWSER_PROVIDER=saucelabs
- JOB=unit-jquery BROWSER_PROVIDER=saucelabs
- JOB=docs-app BROWSER_PROVIDER=saucelabs
- JOB=e2e TEST_TARGET=jqlite BROWSER_PROVIDER=saucelabs
- JOB=e2e TEST_TARGET=jquery BROWSER_PROVIDER=saucelabs
global:
Expand Down
4 changes: 2 additions & 2 deletions scripts/travis/before_build.sh
Original file line number Diff line number Diff line change
Expand Up @@ -12,12 +12,12 @@ if [ "$JOB" != "ci-checks" ]; then
fi

# ci-checks and unit tests do not run against the packaged code
if [ "$JOB" != "ci-checks" ] && [ "$JOB" != "unit" ]; then
if [[ "$JOB" != "ci-checks" ]] && [[ "$JOB" != unit-* ]]; then
grunt package
fi

# unit runs the docs tests too which need a built version of the code
if [ "$JOB" = "unit" ]; then
if [[ "$JOB" = unit-* ]]; then
grunt bower
grunt validate-angular-files
grunt build
Expand Down
43 changes: 30 additions & 13 deletions scripts/travis/build.sh
Original file line number Diff line number Diff line change
Expand Up @@ -2,8 +2,18 @@

set -e

export BROWSER_STACK_ACCESS_KEY=`echo $BROWSER_STACK_ACCESS_KEY | rev`
export SAUCE_ACCESS_KEY=`echo $SAUCE_ACCESS_KEY | rev`
export BROWSER_STACK_ACCESS_KEY
export SAUCE_ACCESS_KEY

BROWSER_STACK_ACCESS_KEY=$(echo "$BROWSER_STACK_ACCESS_KEY" | rev)
SAUCE_ACCESS_KEY=$(echo "$SAUCE_ACCESS_KEY" | rev)

BROWSERS="SL_Chrome,SL_Chrome-1,\
SL_Firefox,SL_Firefox-1,\
SL_Safari_8,SL_Safari_9,\
SL_iOS,\
SL_IE_9,SL_IE_10,SL_IE_11,\
SL_EDGE,SL_EDGE-1"

case "$JOB" in
"ci-checks")
Expand All @@ -17,18 +27,18 @@ case "$JOB" in
yarn run commitplease -- "${TRAVIS_COMMIT_RANGE/.../..}"
fi
;;
"unit")
if [[ "$BROWSER_PROVIDER" == "browserstack" ]]; then
BROWSERS="BS_Chrome,BS_Safari,BS_Firefox,BS_IE_9,BS_IE_10,BS_IE_11,BS_EDGE,BS_iOS_8,BS_iOS_9"
else
BROWSERS="SL_Chrome,SL_Chrome-1,SL_Firefox,SL_Firefox-1,SL_Safari_8,SL_Safari_9,SL_IE_9,SL_IE_10,SL_IE_11,SL_EDGE,SL_EDGE-1,SL_iOS"
fi

"unit-core")
grunt test:promises-aplus
grunt test:unit --browsers="$BROWSERS" --reporters=spec
grunt tests:docs --browsers="$BROWSERS" --reporters=spec
grunt test:jqlite --browsers="$BROWSERS" --reporters=spec
grunt test:modules --browsers="$BROWSERS" --reporters=spec
;;
"docs-e2e")
"unit-jquery")
grunt test:jquery --browsers="$BROWSERS" --reporters=spec
grunt test:jquery-2.2 --browsers="$BROWSERS" --reporters=spec
grunt test:jquery-2.1 --browsers="$BROWSERS" --reporters=spec
;;
"docs-app")
grunt tests:docs --browsers="$BROWSERS" --reporters=spec
grunt test:travis-protractor --specs="docs/app/e2e/**/*.scenario.js"
;;
"e2e")
Expand Down Expand Up @@ -71,6 +81,13 @@ case "$JOB" in
fi
;;
*)
echo "Unknown job type. Please set JOB=ci-checks, JOB=unit, JOB=deploy or JOB=e2e-*."
echo "Unknown job type. Please set JOB to one of\
'ci-checks',\
'unit-core',\
'unit-jquery',\
'docs-app',\
'e2e',\
or\
'deploy'."
;;
esac