-
Notifications
You must be signed in to change notification settings - Fork 1
/
.travis.yml
55 lines (43 loc) · 1.5 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
language: node_js
node_js:
- "17.0.1"
dist: trusty
env:
- NODE_ENV=production CI=true
cache:
npm: true
directories:
- "node_modules"
before_install:
- echo cicd - install npm
- npm i -g npm@8.1.0
install:
- echo cicd - install root dependencies
- npm ci
- echo cicd - install global dependencies
- npm i -g npx serve gh-pages@3.2.3 --force
- echo cicd - clean npm cache
- npx -y lerna exec -- npm cache clean --force
- echo cicd - set option to not fail when peer dependencies requirements fail
- npm config set legacy-peer-deps true
- 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 -y lerna bootstrap --force-local --hoist --ci -- --production=false
- echo cicd - build packages to dist folder
- npx -y lerna run build-package
jobs:
include:
- stage: "Test"
name: "Lint"
script: npx -y lerna run lint
- name: "Unit Tests"
script: npx -y lerna exec -- npm run test -- --coverage
- name: "E2E Tests"
script: npx -y lerna run ci-e2e
- stage: "Deploy"
name: "Publish To Npm"
script: bash scripts/publish.sh
if: branch = master AND repo = galhavivi/cofi AND type = push AND commit_message = cofi-deploy
- name: "Deploy To Gh-Pages"
script: bash scripts/deploy.sh
if: branch = master AND repo = galhavivi/cofi AND type = push AND commit_message = cofi-deploy