-
Notifications
You must be signed in to change notification settings - Fork 29
/
wercker.yml
47 lines (47 loc) · 1.36 KB
/
wercker.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
box: fcclab/tombolo
services:
- id: mdillon/postgis:9.5
env:
POSTGRES_PASSWORD: postgres
build:
steps:
- script:
name: Show basic information
code: |
echo $JAVA_HOME
java -version
javac -version
gradle -v
- script:
name: Set up Postgres env variables
code: |
export PGHOST=$POSTGIS_PORT_5432_TCP_ADDR
export PGPORT=$POSTGIS_PORT_5432_TCP_PORT
export PGUSER=postgres
export PGPASSWORD=postgres
- script:
name: Wait for Postgres to come up
code: |
while ! psql -c "\l"; do
echo "PostgresSQL unavailable, waiting..."
sleep 3
done
- script:
name: Set up test database
code: |
createdb tombolo_test
psql -d tombolo_test -c "CREATE EXTENSION postgis;"
psql -d tombolo_test < src/main/resources/sql/create_database.sql
- script:
name: Run gradle build & test
code: |
gradle test --info -s \
--gradle-user-home=$WERCKER_CACHE_DIR \
-PtestDatabaseURI="jdbc:postgresql://$POSTGIS_PORT_5432_TCP_ADDR:$POSTGIS_PORT_5432_TCP_PORT/tombolo_test" \
-PtestDatabaseUsername="$PGUSER" \
-PtestDatabasePassword="$PGPASSWORD"
after-steps:
- slack-notifier:
url: <Webhook URL goes here>
channel: dev-bots
username: werckerbot