-
Notifications
You must be signed in to change notification settings - Fork 112
/
.travis.yml
47 lines (44 loc) · 1.83 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
sudo: true
dist: trusty
language: node_js
# The specification of multiple node versions
# adds implicit jobs to the test stage (so we don't have to explicitly
# add them), see
# https://docs.travis-ci.com/user/build-stages/#Build-Stages-and-Build-Matrix-Expansion
# for details
node_js:
# NOTE: node v12 doesnt work https://stackoverflow.com/questions/55960396/how-to-fix-npm-install-sqlite-build-fail
# - 'lts/*'
- '10'
cache:
directories:
- node_modules
jobs:
include:
- stage: compile
script:
- npm run lint
- npm run typecheck
- npm run build
- stage: deploy
install: skip
before_install:
- sudo apt-get update
- sudo apt-get -y -o Dpkg::Options::="--force-confnew" install docker-ce
script:
- docker build -t vimflowy/vimflowy .
- docker images
- docker tag "vimflowy/vimflowy:latest" "vimflowy/vimflowy:$(jq -r .version package.json)"
after_success: |
if [[ "$TRAVIS_BRANCH" = "master" ]]; then
docker login -u="$DOCKER_USERNAME" -p="$DOCKER_PASSWORD"
docker push vimflowy/vimflowy
fi
stages:
- compile
- test
- deploy
env:
global:
- DOCKER_USERNAME=vimflowytravis
- secure: RfPC7UfHy73t2nRXTMKNfksRJVNvl1khYS8DUHb5E+E2/lySBDCjMr6VQMiNpUVR3ookmTNKb4K37HFWUtu71zWK/wlH+iGC51v8n6MLvquuY3jxc/bhHtvWJtmD/iLjjQIqn6SIGGyWBXYJcIntG2QnlG+q8DqvWb2jf9/fWsfB83ENVRIYNDdovJPUf047KHfpfBC2qy6WUbWvQzux9R2HNbtIjdJBbh+77/Ngi51//9SuywM/MjTaswv11l7HEGBUF9SPdnM00rArkLMHugaUXCt6LpSkSvzUZQ8psCnI7/0T//z9V3PtuMlTREXAUrmzVOeruS9IE5Ce8UxOngESJHcrrJRYpsUyfigm4rEU76hCe3nY749YnejKFnk4tCq5imr3meJ6VrBdv2+yiRo1NRQM7/N5NqrEJVww8ZjnlocZOZDH/Wzh38jf7w3qIa/hieYcc+bXS1mbHU+0GpdVeOzXBgs/BCGxsZmNWEv/xVGlLrHh0tZcSzQ/K5cMDXRhaWQ3NQyagO1w5V96O3ihVX6EOMtO7CvHMH2FEi0ntbUqaMAzB+gHF2mOG+Pvw2pZ3oIWIMo9JsbKXuBOKLx7uLdsF7X8jXly8Lef0+DoXX90ZC6cWhcHj3ZB/5AEjlm6OPWZJx5sCvshThYbsBNOAYaxDMxBMeVoEzcme14=