forked from B3Partners/brmo
-
Notifications
You must be signed in to change notification settings - Fork 0
/
.travis.yml
63 lines (50 loc) · 1.94 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
language: java
sudo: false
addons:
postgresql: "9.4"
jdk:
- openjdk7
- oraclejdk7
- oraclejdk8
matrix:
fast_finish: true
cache:
directories:
- $HOME/.m2
before_install:
# set up STAGING
- psql --version
- psql -U postgres -a -c "CREATE ROLE staging LOGIN PASSWORD 'staging' SUPERUSER CREATEDB;"
- psql -U postgres -a -c "CREATE ROLE rsgb LOGIN PASSWORD 'rsgb' SUPERUSER CREATEDB;"
- psql -U postgres -c 'create database staging;'
- psql -U postgres -c 'create database rsgb;'
- psql -U postgres -d rsgb -c 'create extension postgis;'
- ls -l ./datamodel/generated_scripts/
# set up RSGB
- travis_wait psql -U postgres -w -d rsgb -a -f ./datamodel/generated_scripts/datamodel_postgresql.sql
- ls -l ./datamodel/utility_scripts/
# - psql -U postgres -d rsgb -a -f ./datamodel/utility_scripts/111a_update_gemeente_geom.sql
# - psql -U postgres -d rsgb -a -f ./datamodel/utility_scripts/113a_update_wijk_geom.sql
install:
# install all dependencies + artifacts without any testing, create staging db scripts
- mvn install -Dmaven.test.skip=true -B -V -fae -q -Ptravis-ci -pl '!brmo-dist'
before_script:
# dit dient na afloop van de 'install' gedaan te worden omdat de staging DB sql gegenereerd wordt door Hibernate
- ls -l ./brmo-persistence/target/ddlscripts/
- psql -U postgres -d staging -a -f ./brmo-persistence/target/ddlscripts/create-brmo-persistence-postgresql.sql
- ls -l ./brmo-persistence/db/
- psql -U postgres -d staging -a -f ./brmo-persistence/db/01_create_indexes.sql
- psql -U postgres -d staging -a -f ./brmo-persistence/db/02_insert_default_user.sql
# run tests
script:
# run unit tests
- mvn -e test -B -Ptravis-ci -pl '!brmo-dist'
# run integration tests
- mvn -e verify -B -Ptravis-ci -pl '!brmo-dist'
# after_success:
# after_failure:
# after_script:
# notifications:
# email: false
# on_success: [always|never|change] # default: change
# on_failure: [always|never|change] # default: always