Skip to content

Commit 3b854ad

Browse files
authored
chore(ci): fix BrowserStack timeouts (#3484)
Assuming that the issue is concurrent jobs attempting to interact with BrowserStack using the same build ID, this solution attempts to solve it by only interacting with BrowserStack in one of the jobs. Updated build definition: - runs complete build on the latest Node - runs simplified build (without commit validation, lint, test:client and test:integration) on earlier versions on Node It is not very valuable to run omitted test suits multiple times as they supposed to catch issues, which are usually Node-independent: client code fails in some browsers and API breaking changes, which will affect popular Karma plugins. Fixes #3468
1 parent 518d001 commit 3b854ad

File tree

2 files changed

+28
-26
lines changed

2 files changed

+28
-26
lines changed

.travis.yml

Lines changed: 28 additions & 25 deletions
Original file line numberDiff line numberDiff line change
@@ -1,15 +1,37 @@
11
os: linux
22
dist: xenial
33
language: node_js
4-
node_js:
5-
- 10
6-
- 12
74

85
jobs:
96
include:
10-
- name: "Lint code and commit message format"
11-
node_js: "10"
12-
env: VALIDATE_COMMIT_MSG=true LINT=true
7+
- node_js: "10"
8+
script:
9+
- npm run init
10+
- npm run build
11+
- npm run test:unit
12+
- npm run test:e2e
13+
14+
- node_js: "12"
15+
script:
16+
- npm run init
17+
- echo "TRAVIS_COMMIT $TRAVIS_COMMIT"
18+
- echo "TRAVIS_PULL_REQUEST_SHA $TRAVIS_PULL_REQUEST_SHA"
19+
- COMMIT_TO_VALIDATE=${TRAVIS_PULL_REQUEST_SHA:-$TRAVIS_COMMIT}
20+
- echo "COMMIT_TO_VALIDATE $COMMIT_TO_VALIDATE"
21+
- ./scripts/validate-commit-msg.sh $COMMIT_TO_VALIDATE
22+
- npm run lint
23+
- npm run build
24+
- npm run test:unit
25+
- npm run test:e2e
26+
- npm run test:client
27+
- npm run test:integration
28+
29+
after_success:
30+
# run automated release process with semantic-release
31+
- echo "TRAVIS_BRANCH=$TRAVIS_BRANCH, TRAVIS_EVENT_TYPE=$TRAVIS_EVENT_TYPE
32+
- if [[ "$TRAVIS_BRANCH" == "master" && "$TRAVIS_EVENT_TYPE" == "push" ]]; then
33+
npm run semantic-release;
34+
fi;
1335

1436
before_install:
1537
- npm config set loglevel warn
@@ -19,22 +41,3 @@ addons:
1941

2042
services:
2143
- xvfb
22-
23-
before_script:
24-
- npm run init
25-
- echo "TRAVIS_COMMIT $TRAVIS_COMMIT"
26-
- echo "TRAVIS_PULL_REQUEST_SHA $TRAVIS_PULL_REQUEST_SHA"
27-
- COMMIT_TO_VALIDATE=${TRAVIS_PULL_REQUEST_SHA:-$TRAVIS_COMMIT}
28-
- echo "COMMIT_TO_VALIDATE $COMMIT_TO_VALIDATE"
29-
- 'if [ "$VALIDATE_COMMIT_MSG" == "true" ]; then ./scripts/validate-commit-msg.sh $COMMIT_TO_VALIDATE; fi'
30-
- 'if [ "$LINT" == "true" ]; then npm run lint; fi'
31-
32-
script:
33-
- npm run travis
34-
35-
after_success:
36-
# run automated release process with semantic-release
37-
- echo "TRAVIS_BRANCH=$TRAVIS_BRANCH, TRAVIS_EVENT_TYPE=$TRAVIS_EVENT_TYPE, TRAVIS_NODE_VERSION=$TRAVIS_NODE_VERSION"
38-
- if [[ "$TRAVIS_BRANCH" == "master" && "$TRAVIS_EVENT_TYPE" == "push" && "$TRAVIS_NODE_VERSION" == "12" ]]; then
39-
npm run semantic-release;
40-
fi;

package.json

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -500,7 +500,6 @@
500500
"init": "rm -rf node_modules/karma && cd node_modules && ln -nsf ../ karma && cd ../",
501501
"init:windows": "(IF EXIST node_modules\\karma (rmdir node_modules\\karma /S /q)) && npm run link",
502502
"appveyor": "npm run build && npm run test:appveyor",
503-
"travis": "npm run build && npm test && npm run test:integration",
504503
"semantic-release": "semantic-release"
505504
}
506505
}

0 commit comments

Comments
 (0)