generated from cfpb/open-source-project-template
-
Notifications
You must be signed in to change notification settings - Fork 14
/
.travis.yml
57 lines (52 loc) · 1.85 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
sudo: false
language: node_js
node_js:
- 12
scala: 2.12.10
jdk:
- openjdk14
# if using Ubuntu 16 need this library
# https://github.com/cypress-io/cypress-documentation/pull/1647
addons:
apt:
packages:
- libgconf-2-4
cache:
directories:
- $HOME/.cache
- $HOME/.cache/Cypress
- $HOME/.m2/repository
- $HOME/.sbt
- $HOME/.ivy2
- $HOME/backend
env:
- APP_PORT=2551 CASSANDRA_CLUSTER_HOSTS=localhost CYPRESS_HOST=http://localhost:3000 CYPRESS_ENVIRONMENT=CI HMDA_RUNTIME_MODE=dev INSTITUTION_PORT=3010
# Run the Platform
before_install:
- yarn global add wait-on
- "[ -d backend/.git ] || git clone https://github.com/cfpb/hmda-platform.git backend"
- cd backend
# Reset the repo so we can have a conflict-less pull
- git reset --hard
- git clean -f
- git pull --rebase
# Trick to avoid unnecessary cache updates
- find $HOME/.sbt -name "*.lock" | xargs -r rm
# Workaround for broken sbt-launch download
- "[ -f $HOME/.sbt/launchers/1.3.10/sbt-launch.jar ] || curl -L --create-dirs -o $HOME/.sbt/launchers/1.3.10/sbt-launch.jar https://repo1.maven.org/maven2/org/scala-sbt/sbt-launch/1.3.10/sbt-launch.jar"
- sbt ++$TRAVIS_SCALA_VERSION "project hmda-platform" "run" &
- wait-on http://localhost:8080
- sbt ++$TRAVIS_SCALA_VERSION "project check-digit" "run" &
- wait-on http://localhost:9091
- sbt ++$TRAVIS_SCALA_VERSION "project ratespread-calculator" "run" &
- wait-on http://localhost:9095
- cd ..
install:
- yarn install --offline
script:
- lsof -i -P -n | grep LISTEN # List port listeners
- yarn ci & # Start Frontend
- cypress install # Ensure cypress is available in Travis environment
# Verify dev server availability, create test data, run test suite.
- wait-on http://localhost:3000 && yarn ci-data && yarn cypress run $CONFIG $RECORD
- kill $(jobs -p) || true # Cleanup