-
Notifications
You must be signed in to change notification settings - Fork 22
/
.travis.yml
73 lines (67 loc) · 2.55 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
language: scala
sudo: required
services:
- docker
jdk:
- oraclejdk8
node_js:
- node
before_script:
- uname -r
- node --version
- yarn --version
jobs:
include:
# Backend tests
- stage: test
script:
- ./scalafmt --test
- sbt server/test:compile
# Compile integration tests to fail build early if they are broken
- sbt server/it:compile
# Run backend tests
- sbt server/test
# Frontend tests
- stage: test
script:
- sbt webui/yarnFormatValidate
# Generate resources to ensure that webpack builds cleanly
- sbt webui/copyResources
# Run Elm tests
- sbt webui/test
- stage: integration
script:
- . prepare-docker-builds
- docker build -t frosner/cluster-broccoli-test docker/test/
- sbt it:test
- bash <(curl -s https://raw.githubusercontent.com/FRosner/http-api-tester/master/http-api-tester) -v -d http-api-tests/instance-persistence-couchdb
- bash <(curl -s https://raw.githubusercontent.com/FRosner/http-api-tester/master/http-api-tester) -v -d http-api-tests/broccoli-only
- bash <(curl -s https://raw.githubusercontent.com/FRosner/http-api-tester/master/http-api-tester) -v -d http-api-tests/broccoli-nomad
- bash <(curl -s https://raw.githubusercontent.com/FRosner/http-api-tester/master/http-api-tester) -v -d http-api-tests/broccoli-nomad-consul
- bash <(curl -s https://raw.githubusercontent.com/FRosner/http-api-tester/master/http-api-tester) -v -d http-api-tests/instance-persistence-dir
- stage: docker
script:
# Publish docker image
- echo "TRAVIS_COMMIT = $TRAVIS_COMMIT"
- echo "TRAVIS_BRANCH = $TRAVIS_BRANCH"
- echo "TRAVIS_PULL_REQUEST = $TRAVIS_PULL_REQUEST"
- docker login -u $DOCKER_USER -p $DOCKER_PASSWORD
- 'if [ "$TRAVIS_PULL_REQUEST" = "false" ]; then sbt server/docker:publish; fi'
before_cache:
# Delete transient files to avoid needless re-caching
- find $HOME/.sbt -name "*.lock" -type f -delete
- find $HOME/.ivy2/cache -name "ivydata-*.properties" -type f -delete
cache:
directories:
# Cache SBT launcher and SBT dependencies
- $HOME/.sbt/0.13/dependency
- $HOME/.sbt/boot/scala*
- $HOME/.sbt/launchers
- $HOME/.ivy2/cache
# Cache ELM stuff. In particular build-artifacts for tests to avoid needless
# rebuilds
- webui/elm-stuff/packages
- webui/tests/elm-stuff/packages
- webui/tests/elm-stuff/build-artifacts
after_success:
- bash <(curl -s https://codecov.io/bash)