-
Notifications
You must be signed in to change notification settings - Fork 0
/
.travis.yml
43 lines (38 loc) · 966 Bytes
/
.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
language: node_js
cache:
directories:
- node_modules
notifications:
email: false
before_install:
- git fetch --tags
branches:
except:
- /^v\d+\.\d+\.\d+$/
node_js: '12.13'
stages:
- name: test
# require the event type to not be a semantic release tag.
if: NOT tag =~ ^v\d+\.\d+\.\d+$
- name: deploy-dev
if: branch = dev AND fork = false AND type IN (push, api)
- name: release
if: branch = dev AND fork = false AND type IN (push, api)
- name: deploy-prod
if: branch = prod AND fork = false AND type IN (push, api)
jobs:
include:
- stage: test
script:
- yarn lint
- yarn test
- stage: deploy-dev
script:
- yarn --prod
- yarn sls deploy -s dev -v && yarn sls -s dev files
- stage: release
script: yarn semantic-release
- stage: deploy-prod
script:
- yarn --prod
- yarn sls deploy -s production -v && yarn sls -s production files