forked from deep7102/project-hardcore
-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy path.travis.yml
58 lines (57 loc) · 1.67 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
addons:
chrome: stable
language: node_js
dist: trusty
# Leave node_js version blank to
# use version in `.nvmrc`
node_js:
cache:
directories:
- node_modules
env:
- TEST_SUITE=e2e
- TEST_SUITE=functional
- TEST_SUITE=lint
install:
- npm install -g grunt-cli
- npm install
before_script:
- export TZ=America/New_York
- if [ $TEST_SUITE != lint ]; then npm run build; fi
script:
- if [ $TEST_SUITE = e2e ]; then (npm run quickstart &) && sleep 5; fi
- npm run $TEST_SUITE:ci
- if [ $TEST_SUITE = e2e ]; then npm run stop; fi
- if [ $TRAVIS_EVENT_TYPE = cron ] && [ $TEST_SUITE = e2e ]; then npm run e2e:ci:bs; fi
jobs:
include:
- stage: deploy
env: TEST_SUITE=e2e
before_install: skip
install: skip
script: skip
deploy:
# DEPLOY BUILD TO DEMO SERVER
# this runs conditionally `on`
# "push" events to "master" branch
- provider: script
script: ./scripts/jenkins-deploy.sh -b master -w
skip_cleanup: true
on:
condition: $TRAVIS_EVENT_TYPE = push
branch: master
# NPM PUBLISH NIGHTLY DEV BUILD
# this runs conditionally on "cron" events
# and uses default branch "master"
- provider: script
script: ./scripts/publish-nightly.sh
skip_cleanup: true
on:
condition: $TRAVIS_EVENT_TYPE = cron
# Specify stage(s) order and conditionals per stage
stages:
- test
- name: deploy
# do not run the deploy stage for Pull Request checks
# and require the branch name to be master (note for PRs this is the base branch name)
if: NOT type IN (pull_request) AND branch = master