forked from dbfit/dbfit
-
Notifications
You must be signed in to change notification settings - Fork 0
223 lines (205 loc) · 5.79 KB
/
build.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
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
198
199
200
201
202
203
204
205
206
207
208
209
210
211
212
213
214
215
216
217
218
219
220
221
222
223
name: build
on:
push:
pull_request:
workflow_dispatch:
schedule:
- cron: "15 5 * * *"
jobs:
fast-build:
strategy:
matrix:
os: ['ubuntu-latest']
distribution: ['zulu']
java: ['8']
runs-on: ${{ matrix.os }}
name: Java ${{ matrix.Java }} (${{ matrix.distribution }}) fastbuild
timeout-minutes: 12
steps:
- name: Checkout
uses: actions/checkout@v2
- name: Fast build
uses: gradle/gradle-build-action@v2
with:
arguments: |
clean
fastbuild
- name: Bundle
uses: gradle/gradle-build-action@v2
with:
arguments: bundle
- name: Determine bundle name
run: echo "project_bundle=`basename zips/*.zip`" >> $GITHUB_ENV
- name: Upload zips artifacts
uses: actions/upload-artifact@v2
with:
name: ${{ env.project_bundle }}
path: ${{ github.workspace }}/zips/${{ env.project_bundle}}
test_postgres:
strategy:
matrix:
os: ['ubuntu-20.04']
distribution: ['zulu']
java: ['8', '11']
db_kind: ['postgres']
runs-on: ${{ matrix.os }}
name: Java ${{ matrix.Java }} (${{ matrix.distribution }}) ${{ matrix.db_kind }}
timeout-minutes: 12
services:
postgres:
image: postgres
ports:
- 5432:5432
env:
POSTGRES_USER: dbfit
POSTGRES_PASSWORD: dbfit
POSTGRES_DB: dbfit
PGPASSWORD: dbfit
options: >-
--name ${{ matrix.db_kind }}
--health-cmd pg_isready
--health-interval 10s
--health-timeout 5s
--health-retries 5
steps:
- name: Checkout
uses: actions/checkout@v2
- name: Db Integration tests
uses: ./.github/actions/db-integration-test
with:
database_kind: ${{ matrix.db_kind }}
test_mysql:
strategy:
matrix:
os: ['ubuntu-20.04']
distribution: ['zulu']
java: ['8', '11']
db_kind: ['mysql']
runs-on: ${{ matrix.os }}
name: Java ${{ matrix.Java }} (${{ matrix.distribution }}) ${{ matrix.db_kind }}
timeout-minutes: 12
services:
mysql:
image: mysql:5.7
env:
MYSQL_DATABASE: dbfit
MYSQL_USER: dbfit
MYSQL_PASSWORD: password
MYSQL_ROOT_PASSWORD: rootpassword
ports:
- 3306:3306
options: >-
--name ${{ matrix.db_kind }}
--health-cmd="mysqladmin ping"
--health-interval=10s
--health-timeout=5s
--health-retries=3
steps:
- name: Checkout
uses: actions/checkout@v2
- name: Db Integration tests
uses: ./.github/actions/db-integration-test
with:
database_kind: mysql
test_db2:
strategy:
matrix:
os: ['ubuntu-20.04']
distribution: ['zulu']
java: ['8', '11']
db_kind: ['db2']
runs-on: ${{ matrix.os }}
name: Java ${{ matrix.Java }} (${{ matrix.distribution }}) ${{ matrix.db_kind }}
timeout-minutes: 12
services:
db2:
image: ibmcom/db2:latest
ports:
- 50000:50000
env:
DB2INST1_PASSWORD: db2inst1-pwd
LICENSE: accept
DBNAME: db2inst1
options: >-
--name ${{ matrix.db_kind }}
--privileged
--health-cmd "test -f /database/config/.shared-data/setup_complete"
--health-interval 10s
--health-timeout 5s
--health-retries 40
steps:
- name: Checkout
uses: actions/checkout@v2
- name: Db Integration tests
uses: ./.github/actions/db-integration-test
with:
database_kind: ${{ matrix.db_kind }}
test_oracle:
strategy:
matrix:
os: ['ubuntu-20.04']
distribution: ['zulu']
java: ['8', '11']
db_kind: ['oracle']
runs-on: ${{ matrix.os }}
name: Java ${{ matrix.Java }} (${{ matrix.distribution }}) ${{ matrix.db_kind }}
timeout-minutes: 12
services:
oracle:
image: gvenzl/oracle-xe:21
ports:
- 1521:1521
env:
ORACLE_URL: localhost:1521/XEPDB1
ORACLE_PASSWORD: Oracle18
ORACLE_ADMIN_PASSWORD: Oracle18
ORACLE_ADMIN_USER: system
NLS_LANG: AMERICAN_AMERICA.AL32UTF8
options: >-
--name oracle
--health-cmd healthcheck.sh
--health-interval 10s
--health-timeout 5s
--health-retries 20
steps:
- name: Checkout
uses: actions/checkout@v2
- name: Db Integration tests
uses: ./.github/actions/db-integration-test
with:
database_kind: ${{ matrix.db_kind }}
test_sqlserver:
strategy:
matrix:
os: ['ubuntu-20.04']
distribution: ['zulu']
java: ['8']
db_kind: ['sqlserver']
runs-on: ${{ matrix.os }}
name: Java ${{ matrix.Java }} (${{ matrix.distribution }}) ${{ matrix.db_kind }}
timeout-minutes: 12
env:
DB_ADMIN_PASSWORD: yourStrongP@ssword
services:
sqlserver:
image: mcr.microsoft.com/mssql/server:2019-latest
env:
ACCEPT_EULA: Y
SA_PASSWORD: ${{ env.DB_ADMIN_PASSWORD }}
MSSQL_PID: Express
ports:
- 1433:1433
options: >-
--name ${{ matrix.db_kind }}
--health-cmd "/opt/mssql-tools/bin/sqlcmd -U sa -P $SA_PASSWORD -Q 'select 1' -b -o /dev/null"
--health-interval 60s
--health-timeout 30s
--health-start-period 20s
--health-retries 3
steps:
- name: Checkout
uses: actions/checkout@v2
- name: Db Integration tests
uses: ./.github/actions/db-integration-test
with:
database_kind: ${{ matrix.db_kind }}