forked from dr4fters/dr4ft
-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy path.travis.yml
137 lines (129 loc) · 3.38 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
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
#normal matrix.include setup
env: # key needs exist on top level for allow_failure on env to work, see https://docs.travis-ci.com/user/customizing-the-build/#matching-jobs-with-allow_failures
matrix:
include:
- name: Install Node.js app (latest Node.js)
language: node_js
node_js: node
cache:
directories:
- node_modules
install:
- npm install
script: skip
- name: Install Node.js app (latest Node.js LTS)
language: node_js
node_js: lts/*
cache:
directories:
- node_modules
install:
- npm install
script: skip
- name: Build and run Docker image (latest Docker, recent Node.js)
language: minimal
env: docker
services:
- docker
addons:
apt:
packages:
- docker-ce
script:
- docker --version
- docker build --tag dr4ft-app .
- docker run -dp 1337:1337 dr4ft-app
- docker ps -a
after_script:
- docker images
- name: ESLint
language: node_js
node_js: node
env: eslint
install:
- npm install --ignore-scripts
script:
- npm run setup-env
- npm run lint
- name: Run tests
language: node_js
node_js: node
install:
- npm install
script:
- npm test
allow_failures:
- env: docker
- env: eslint
fast_finish: true # mark build as failed/passed as soon as possible, don't wait for the allow_failures build to finish! See https://docs.travis-ci.com/user/customizing-the-build#fast-finishing
#-------------------------------------------------
#nodejs + docker in stages setup
#jobs:
# include:
# - stage: Tests
# name: Install (on latest Node.js)
# language: node_js
# node_js:
# - node # latest stable Node.js release
# # - lts/* # latest LTS Node.js release
# install:
# - npm install
# # script:
# # - npm start
# # after_script:
# # - npm test
# # cache:
# # directories:
# # - "node_modules"
# - stage: Tests
# name: Install (on latest Node.js LTS)
# language: node_js
# node_js:
# - lts/* # latest LTS Node.js release
# install:
# - npm install
# # script:
# # - npm start
# # after_script:
# # - npm test
# # cache:
# # directories:
# # - "node_modules"
# - stage: Tests
# name: Build and run Docker image (with 'Dockerfile')
# language: minimal
# services:
# - docker
# script:
# - docker --version
# - docker build --tag dr4ft-app . # builds from the Dockerfile in repo root
# - docker run -dp 1337:1337 dr4ft-app
# - docker ps -a
# after_script:
# - docker images
# - stage: Tests
# name: Build and run Docker image (with 'Dockerfile'), newest Docker
# language: generic
# addons:
# apt:
# packages:
# - docker-ce
# services:
# - docker
# script:
# - docker --version
# - docker build --tag dr4ft-app . # builds from the Dockerfile in repo root
# - docker run -dp 1337:1337 dr4ft-app
# - docker ps -a
# after_script:
# - docker images
#notifications:
# email: false
# webhooks:
# urls:
# - put dr4ft gitter hook url here
# on_success: change
# on_failure: change
# on_start: never
# on_cancel: change
# on_error: change