forked from WoWAnalyzer/WoWAnalyzer
-
Notifications
You must be signed in to change notification settings - Fork 0
/
.travis.yml
56 lines (56 loc) · 1.35 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
language: node_js
node_js: 10.12
# every second counts
git:
depth: 5
env:
- NODE_ENV=production ESLINT_BEFORE_BUILD=false
jobs:
include:
- stage: test
name: "eslint"
cache:
directories:
- node_modules
install:
- npm install --dev
script:
- npm run lint -- --max-warnings=0
- stage: test
name: "tests"
cache:
directories:
- node_modules
install:
- npm install --dev
script:
- npm run test -- --maxWorkers=2
- stage: test
name: "server tests"
cache:
directories:
- server/node_modules
env:
- NODE_ENV=test
install:
- cd server && npm install --dev && cd ..
script:
- cd server && npm run test:once -- --maxWorkers=2 && cd ..
# TODO: Code duplication calculator
- stage: build
language: generic
services: docker
script: docker build -f .docker/production/Dockerfile --tag wowanalyzer .
# Reminder: deploy doesn't run on PRs
deploy:
provider: script
skip_cleanup: true
script: bash .docker/production/deploy.sh
on:
all_branches: true
after_failure:
- chmod +x .travis/discord-hook/fail.sh
- ./.travis/discord-hook/fail.sh
notifications:
webhooks: https://www.travisbuddy.com/
on_success: never