forked from CenterForOpenScience/ember-osf-web
-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy path.travis.yml
66 lines (61 loc) · 1.81 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
language: node_js
sudo: false
dist: trusty
env:
global:
- SUPPRESS_NO_CONFIG_WARNING=true
- GK_LOCK_YARN_OPTS='--ignore-engines'
cache:
yarn: true
directories:
- node_modules
jobs:
include:
- stage: "test"
if: |
branch ~= /^develop$|^master$|^release\/.+$/ OR \
type = pull_request OR \
env(RESTRICT_PUSH_BUILDS) != true
addons:
chrome: stable
before_install:
- curl -o- -L https://yarnpkg.com/install.sh | bash
- export PATH=$HOME/.yarn/bin:$PATH
- yarn global add greenkeeper-lockfile@1
install:
- yarn --prefer-offline --frozen-lockfile --ignore-engines
- greenkeeper-lockfile-update
script:
- yarn lint && yarn test:node-tests && yarn test:cover
after_script:
- greenkeeper-lockfile-upload
after_success:
- cat ./coverage/lcov.info | ./node_modules/coveralls/bin/coveralls.js
- stage: "deploy handbook"
if: |
branch = develop AND \
type != pull_request AND \
env(DEPLOY_KEY) IS present
before_install:
- curl -o- -L https://yarnpkg.com/install.sh | bash
- export PATH=$HOME/.yarn/bin:$PATH
install:
- yarn --prefer-offline --frozen-lockfile --ignore-engines
env:
- HANDBOOK_ENABLED=1
- MIRAGE_ENABLED=1
- SHOW_DEV_BANNER=1
- A11Y_AUDIT=0
- NODE_OPTIONS=--max-old-space-size=4096
- TARGET_BRANCH=gh-pages
script:
- export ROOT_URL="/${TRAVIS_REPO_SLUG##*\/}/"
- export ASSETS_PREFIX="${ROOT_URL}"
- ember build --environment=production
- cp dist/index.html dist/404.html
deploy:
provider: script
skip-cleanup: true
script: scripts/handbook_deploy.sh
on:
branch: develop