-
Notifications
You must be signed in to change notification settings - Fork 0
/
.travis.yml
158 lines (158 loc) · 4.76 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
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
dist: xenial
notifications:
email: false
git:
quiet: true
depth: 1
language: java
jdk: openjdk8
node_js: lts/*
python: 3
service:
- docker
- xvfb
addons:
apt:
update: true
packages:
- sudo
- lsof
- wget
- bash
- curl
- jq
- libxml2-utils
- unzip
- docker-ce
- python3-dev
- python3-pip
- python3-six
- python3-setuptools
- libappindicator1
- fonts-liberation
- google-chrome-stable
install: true
before_install:
- docker-compose -v
- export PATH=$HOME/.local/bin:$PATH
- pip3 install --user $(whoami) --upgrade pip >/dev/null # pip3 -> pip
- pip install --user $(whoami) --upgrade docker-compose httpie >/dev/null 2>&1
- http --version --debug
- docker-compose -v
#
- source <(curl -s https://raw.githubusercontent.com/daggerok/bash-functions/master/main.bash)
- stop_any 80 8001 8002 8080 5432
before_script:
- docker pull healthcheck/postgres:alpine
- ./mvnw -Pdocker docker:start -U
- docker ps
after_script:
- ./mvnw -Pdocker docker:stop
stages:
- test
- maintain
jobs:
include:
- stage: test
jdk: openjdk8
name: Run maven tests
script: cd $TRAVIS_BUILD_DIR && ./mvnw clean test -U
- stage: test
jdk: openjdk8
name: Run maven tests openjdk11
script: cd $TRAVIS_BUILD_DIR && ./mvnw clean test -U
- stage: test
jdk: openjdk8
name: Build uberJar profile and run integration tests
script:
- cd $TRAVIS_BUILD_DIR && ./mvnw -DskipTests package -PuberJar -U
- java -jar target/*-runner.jar &
- wait_for 8080
- sleep 5s
- http :8080/health
- http :8080/api/client/hello
- http :8080/api/client/hello
- stop_any 80 8080
- stage: test
jdk: openjdk11
name: Build uberJar profile and run integration tests openjdk11
script:
- cd $TRAVIS_BUILD_DIR && ./mvnw -DskipTests package -PuberJar -U
- java -jar target/*-runner.jar &
- wait_for 8080
- sleep 5s
- http :8080/health
- http :8080/api/client/hello
- http :8080/api/client/hello
- stop_any 80 8080
- stage: test
jdk: openjdk8
name: Build quarkus uberJar and run integration tests
script:
- cd $TRAVIS_BUILD_DIR && ./mvnw compile jar:jar quarkus:build -U
- java -jar target/*-runner.jar &
- wait_for 8080
- sleep 5s
- http :8080/health
- http :8080/api/client/hello
- http :8080/api/client/hello
- stop_any 80 8080
- stage: test
jdk: openjdk11
name: Build quarkus uberJar and run integration tests openjdk11
script:
- cd $TRAVIS_BUILD_DIR && ./mvnw compile jar:jar quarkus:build -U
- java -jar target/*-runner.jar &
- wait_for 8080
- sleep 5s
- http :8080/health
- http :8080/api/client/hello
- http :8080/api/client/hello
- stop_any 80 8080
- stage: test
jdk: openjdk8
name: Test app with maven docker-compose plugin
script:
- cd $TRAVIS_BUILD_DIR && ./mvnw -P docker-compose compile jar:jar quarkus:build docker-compose:up -U
- sleep 5s
- http :8080/health
- http :8080/api/client/hello
- http :8080/api/client/hello
- cd $TRAVIS_BUILD_DIR && ./mvnw -P docker-compose docker-compose:down
- stage: test
jdk: openjdk8
name: Test Dockerfile.jvm
script:
- cd $TRAVIS_BUILD_DIR && ./mvnw clean compile jar:jar quarkus:build -U
- docker build -f src/main/docker/Dockerfile.jvm -t quarkus/quarkus-example-jvm .
- docker run -i --rm --name jvm-app -p 8080:8080 quarkus/quarkus-example-jvm &
- wait_for 8080
- sleep 5s
- http :8080/health
- http :8080/api/client/hello
- docker rm -f -v jvm-app
- stage: test
jdk: openjdk8
name: Test Dockerfile.native
script:
- cd $TRAVIS_BUILD_DIR && ./mvnw package -Pnative -Dnative-image.docker-build=true -U
- docker build -f src/main/docker/Dockerfile.native -t quarkus/quarkus-example-native .
- docker run -i --rm --name native-app -p 8080:8080 quarkus/quarkus-example-native &
- wait_for 8080
- sleep 3s
- http :8080/health
- http :8080/api/client/hello
- docker rm -f -v native-app
- stage: test
jdk: openjdk8
name: Run mvn versions:display-property-updates command
script: cd $TRAVIS_BUILD_DIR && ./mvnw versions:display-property-updates -U
- stage: test
jdk: openjdk11
name: Run mvn versions:display-property-updates command openjdk11
script: cd $TRAVIS_BUILD_DIR && ./mvnw versions:display-property-updates -U
cache:
directories:
- ~/.m2
packages: true
pip: true