-
Notifications
You must be signed in to change notification settings - Fork 9
/
.travis.yml
52 lines (41 loc) · 1.37 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
language: node_js
node_js:
- "12.14.0"
dist: trusty
env:
- NODE_ENV=production CI=true
cache:
npm: true
directories:
- "node_modules"
before_install:
- echo cicd - install npm
- npm i -g npm@6.13.6
install:
- echo cicd - install root dependencies
- npm ci
- echo cicd - install global dependencies
- npm i -g npx serve gh-pages@2.2.0 --force
- echo cicd - clean npm cache
- npx lerna exec -- npm cache clean --force
- echo cicd - install and link all local packages to dist folders regardless of matching version range
- echo cicd - note - lerna looks on package.json -> publishConfig -> directory to link to it
- npx lerna bootstrap --force-local --hoist --ci -- --production=false
- echo cicd - build packages to dist folder
- npx lerna run build-package
jobs:
include:
- stage: "Test"
name: "Lint"
script: npx lerna run lint
- name: "Unit Tests"
script: npx lerna exec -- npm run test -- --coverage
- name: "E2E Tests"
script: npx lerna run ci-e2e
- stage: "Deploy"
name: "Publish To Npm"
script: bash scripts/publish.sh
if: branch = master AND repo = yahoo/jafar AND type = push AND commit_message = jafar-deploy
- name: "Deploy To Gh-Pages"
script: bash scripts/deploy.sh
if: branch = master AND repo = yahoo/jafar AND type = push AND commit_message = jafar-deploy