forked from optimizely/javascript-sdk
-
Notifications
You must be signed in to change notification settings - Fork 0
/
.travis.yml
92 lines (85 loc) · 2.35 KB
/
.travis.yml
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
language: node_js
node_js:
- '8'
- '9'
- '10'
- '12'
- '14'
branches:
only:
- master
- /^\d+\.\d+\.(\d|[x])
env:
global:
- SDK=javascript
- SDK_BRANCH=$TRAVIS_PULL_REQUEST_BRANCH
before_install: cd packages/optimizely-sdk
install: npm install
script: npm test
after_success: npm run coveralls
# Integration tests need to run first to reset the PR build status to pending
stages:
- 'Source Clear'
- 'Lint markdown files'
- 'Lint'
- 'Integration tests'
- 'Full stack production tests'
- 'Cross-browser and umd unit tests'
- 'Test'
- 'Test sub packages'
jobs:
include:
- stage: 'Lint markdown files'
os: linux
language: generic
install: gem install awesome_bot
script:
- find . -type f -name '*.md' -exec awesome_bot {} \;
notifications:
email: false
- stage: 'Lint'
node_js: '12'
script: npm run lint
- &integrationtest
stage: 'Integration tests'
merge_mode: replace
cache: false
language: minimal
before_install: skip
install: skip
before_script:
- mkdir $HOME/travisci-tools && pushd $HOME/travisci-tools && git init && git pull https://[email protected]/optimizely/travisci-tools.git && popd
script:
- CLIENT=node $HOME/travisci-tools/trigger-script-with-status-update.sh
- CLIENT=browser $HOME/travisci-tools/trigger-script-with-status-update.sh
after_success: travis_terminate 0
- <<: *integrationtest
stage: 'Full stack production tests'
env:
SDK=javascript
SDK_BRANCH=$TRAVIS_PULL_REQUEST_BRANCH
FULLSTACK_TEST_REPO=ProdTesting
script: $HOME/travisci-tools/trigger-script-with-status-update.sh
- stage: Cross-browser and umd unit tests
node_js: '8'
script: npm run test-ci
- &packagetest
stage: 'Test sub packages'
node_js: '12'
before_install: cd packages/utils
- <<: *packagetest
before_install: cd packages/event-processor
- <<: *packagetest
before_install: cd packages/logging
- <<: *packagetest
before_install: cd packages/datafile-manager
- stage: 'Source Clear'
if: type = cron
addons:
srcclr: true
before_install: cd packages/optimizely-sdk
install: skip
before_script: skip
script: skip
after_script: skip
after_success: skip