This repository has been archived by the owner on Feb 19, 2022. It is now read-only.
-
Notifications
You must be signed in to change notification settings - Fork 7
/
Copy path.travis.yml
57 lines (50 loc) · 1.63 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
language: node_js
node_js:
- "4"
- "6"
- "8"
# Use container-based Travis infrastructure.
sudo: false
branches:
only:
- master
before_install:
# GUI for real browsers.
- export DISPLAY=:99.0
- sh -e /etc/init.d/xvfb start
script:
# Check archetype with yarn.
- yarn --version
- yarn run builder:check
# Initialize a fresh project from templates using npm.
- npm install -g builder-init
- npm link
- mkdir .builder-init-tmp
- cd .builder-init-tmp
- >-
builder-init $PWD/.. --prompts='{
"packageName":"whiz-bang",
"packageGitHubOrg":"Acme",
"packageDescription":"Whiz Bang",
"licenseDate":"2016",
"licenseOrg":"Acme",
"destination":"whiz-bang"}'
# Run initialized project's own CI with npm link'ed prod archetype.
# **Note**: The _dev_ archetype should be separately published and pinned first.
- cd whiz-bang
- npm link builder-react-component
# Bug:
# ```
# npm ERR! /home/travis/build/FormidableLabs/builder-react-component/node_modules/fsevents/node_modules/abbrev is not a child of /home/travis/build/FormidableLabs/builder-react-component/.builder-init-tmp/whiz-bang
# ```
# - https://github.com/npm/npm/issues/18233
# - https://github.com/npm/npm/issues/17637
- npm install --no-optional
- node_modules/.bin/builder run check-ci
# Workaround for Travis and/or npm bug in pruning...
# ```
# $ npm prune --production
# npm ERR! May not delete: /home/travis/build/FormidableLabs/builder-react-component/.builder-init-tmp/whiz-bang/node_modules/.bin
# ```
- npm prune --production || echo "Pruning failed. Continuing..."
- node_modules/.bin/builder run build