forked from CenterForOpenScience/ember-osf-web
-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy path.travis.yml
65 lines (60 loc) · 1.88 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
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 \
repo = CenterForOpenScience/ember-osf-web
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
- ROOT_URL=/ember-osf-web/
- ASSETS_PREFIX=/ember-osf-web/
- A11Y_AUDIT=0
script:
# TODO: switch back to prod build when ember-cli-mirage is fixed: https://github.com/samselikoff/ember-cli-mirage/pull/1376
#- ember build --environment=production && cp dist/index.html dist/404.html
- ember build && cp dist/index.html dist/404.html
deploy:
provider: pages
skip-cleanup: true
github-token: $GH_TOKEN
local-dir: dist
on:
branch: develop