forked from geosolutions-it/geoserver-restconfig
-
Notifications
You must be signed in to change notification settings - Fork 31
/
.travis.yml
54 lines (52 loc) · 1.75 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
sudo: required
language: python
dist: xenial
addons:
postgresql: "9.6"
apt:
packages:
- postgresql-9.6-postgis-2.4
services:
- postgresql
matrix:
include:
- python: "3.7"
env: GS_VERSION=2.16.x
- python: "3.7"
env: GS_VERSION=2.17.x
- python: "3.7"
env: GS_VERSION=master
install:
- sudo apt-get -qq -y update
- sudo apt-get install -y --force-yes openjdk-8-jdk --no-install-recommends
- java -version
- which java
- update-alternatives --list java
- mkdir gs
- pushd gs
- wget https://repo1.maven.org/maven2/org/eclipse/jetty/jetty-runner/9.4.31.v20200723/jetty-runner-9.4.31.v20200723.jar
- wget https://build.geoserver.org/geoserver/${GS_VERSION}/geoserver-${GS_VERSION}-latest-war.zip
- unzip geoserver-${GS_VERSION}-latest-war.zip
- popd
- pip install .
- pip install psycopg2
before_script:
- if [[ "$GS_VERSION" == "2.16.x" ]] || [[ "$GS_VERSION" == "2.17.x" ]] || [[ "$GS_VERSION" == "master" ]]; then
/usr/local/lib/jvm/openjdk11/bin/java -Xmx1024m -Dorg.eclipse.jetty.server.webapp.parentLoaderPriority=true -jar gs/jetty-runner-9.4.31.v20200723.jar --path /geoserver gs/geoserver.war > /dev/null 2>&1 &
else
/usr/lib/jvm/java-8-openjdk-amd64/jre/bin/java -Xmx1024m -Dorg.eclipse.jetty.server.webapp.parentLoaderPriority=true -jar gs/jetty-runner-9.4.31.v20200723.jar --path /geoserver gs/geoserver.war > /dev/null 2>&1 &
fi
- psql -U postgres -c "create extension postgis"
- psql -U postgres -c "create database db;"
- psql -U postgres -d db -c "create extension postgis"
- psql -U postgres -c "alter user postgres with password 'postgres';"
- sleep 30
script:
- python setup.py test
notifications:
email:
on_success: never
on_failure: never
branches:
only:
- master