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

Commit 7882c1c

Browse files
Narretzpetebacondarwin
authored andcommitted
chore(travis): add a new job that runs ci-checks
Previously, ddescribe, merge-conflicts, jshint, and jscs would run after unit & e2e tests ran. The order was orginally changed as part of #9792. While the logic is sound that style errors shouldn't block tests from running, ddescribe should always run. This was not guaraneteed; when Travis exits with a warning after some browsers have run, ddescribe doesn't get run and it doesn't become apparent that not all tests have run. Additionally, a separate job clearly separates style from test errors, which e.g. means you can open a PR that includes an iit to speed up the job, and see immediately if the test passes, because the ddescribe error is in another job.
1 parent 84a6ef4 commit 7882c1c

File tree

3 files changed

+24
-8
lines changed

3 files changed

+24
-8
lines changed

.travis.yml

+2-5
Original file line numberDiff line numberDiff line change
@@ -15,6 +15,7 @@ branches:
1515

1616
env:
1717
matrix:
18+
- JOB=ci-checks
1819
- JOB=unit BROWSER_PROVIDER=saucelabs
1920
- JOB=docs-e2e BROWSER_PROVIDER=saucelabs
2021
- JOB=e2e TEST_TARGET=jqlite BROWSER_PROVIDER=saucelabs
@@ -51,11 +52,7 @@ install:
5152
- npm install
5253

5354
before_script:
54-
- mkdir -p $LOGS_DIR
55-
- ./scripts/travis/start_browser_provider.sh
56-
- npm install -g grunt-cli
57-
- grunt package
58-
- ./scripts/travis/wait_for_browser_provider.sh
55+
- ./scripts/travis/before_build.sh
5956

6057
script:
6158
- ./scripts/travis/build.sh

scripts/travis/before_build.sh

+18
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,18 @@
1+
#!/bin/bash
2+
3+
set -e
4+
5+
mkdir -p $LOGS_DIR
6+
7+
if [ $JOB != "ci-checks" ]; then
8+
echo "start_browser_provider"
9+
./scripts/travis/start_browser_provider.sh
10+
fi
11+
12+
npm install -g grunt-cli
13+
14+
if [ $JOB != "ci-checks" ]; then
15+
grunt package
16+
echo "wait_for_browser_provider"
17+
./scripts/travis/wait_for_browser_provider.sh
18+
fi

scripts/travis/build.sh

+4-3
Original file line numberDiff line numberDiff line change
@@ -5,7 +5,9 @@ set -e
55
export BROWSER_STACK_ACCESS_KEY=`echo $BROWSER_STACK_ACCESS_KEY | rev`
66
export SAUCE_ACCESS_KEY=`echo $SAUCE_ACCESS_KEY | rev`
77

8-
if [ $JOB = "unit" ]; then
8+
if [ $JOB = "ci-checks" ]; then
9+
grunt ci-checks
10+
elif [ $JOB = "unit" ]; then
911
if [ "$BROWSER_PROVIDER" == "browserstack" ]; then
1012
BROWSERS="BS_Chrome,BS_Safari,BS_Firefox,BS_IE_9,BS_IE_10,BS_IE_11,BS_iOS"
1113
else
@@ -14,7 +16,6 @@ if [ $JOB = "unit" ]; then
1416

1517
grunt test:promises-aplus
1618
grunt test:unit --browsers $BROWSERS --reporters dots
17-
grunt ci-checks
1819
grunt tests:docs --browsers $BROWSERS --reporters dots
1920
elif [ $JOB = "docs-e2e" ]; then
2021
grunt test:travis-protractor --specs "docs/app/e2e/**/*.scenario.js"
@@ -31,5 +32,5 @@ elif [ $JOB = "e2e" ]; then
3132
export TARGET_SPECS="test/e2e/tests/**/*.js,$TARGET_SPECS"
3233
grunt test:travis-protractor --specs "$TARGET_SPECS"
3334
else
34-
echo "Unknown job type. Please set JOB=unit or JOB=e2e-*."
35+
echo "Unknown job type. Please set JOB=ci-checks, JOB=unit or JOB=e2e-*."
3536
fi

0 commit comments

Comments
 (0)