forked from WoWAnalyzer/WoWAnalyzer
-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy path.travis.yml
51 lines (51 loc) · 1.32 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
language: node_js
node_js: '10.12'
# every second counts
git:
depth: 5
env:
global:
- NODE_ENV=production
jobs:
include:
- stage: test
name: "Check if a changelog entry exists"
if: type = pull_request
install: true # skip install since it has no dependencies
script:
- node scripts/require-changelog-entry.js
- stage: test
name: "code-quality: eslint"
cache:
directories:
- $HOME/.npm
install:
- npm ci --dev
script:
- npm run lint -- --max-warnings=0
- stage: test
name: "tests"
cache:
directories:
- $HOME/.npm
install:
- npm ci --dev
script:
- npm run test -- --maxWorkers=2
- stage: build
language: generic
services: docker
script: docker build --tag wowanalyzer --build-arg REACT_APP_ENVIRONMENT_NAME=$TRAVIS_BRANCH --build-arg REACT_APP_VERSION=$TRAVIS_COMMIT --build-arg ESLINT_BEFORE_BUILD=false .
# Reminder: deploy doesn't run on PRs
deploy:
provider: script
skip_cleanup: true
script: bash .travis/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