Skip to content

Commit 5ee9ce2

Browse files
committed
Run Integration Tests against MySQL 5.6
1 parent 5448bd1 commit 5ee9ce2

File tree

1 file changed

+71
-0
lines changed

1 file changed

+71
-0
lines changed

.github/workflows/integration-testing.yml

Lines changed: 71 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -148,6 +148,77 @@ jobs:
148148
run: |
149149
./example "host=localhost;port=$MYSQL_PORT;user=testuser;pwd=passw0rd;db=testdb"
150150
151+
mysql56-tests:
152+
name: MySQL 5.6 Tests ${{ matrix.compiler }}
153+
strategy:
154+
fail-fast: false
155+
# max-parallel: 2
156+
matrix:
157+
compiler:
158+
- dmd-latest
159+
- ldc-latest
160+
- dmd-2.095.1
161+
- dmd-2.094.2
162+
- ldc-1.25.1 # eq to dmd v2.095.1
163+
- ldc-1.24.0 # eq to dmd v2.094.1
164+
165+
runs-on: ubuntu-20.04
166+
167+
services:
168+
mysql:
169+
image: mysql:5.6
170+
ports: [3306]
171+
env:
172+
MYSQL_ROOT_PASSWORD: f48dfhw3Hd!Asah7i2aZ
173+
MYSQL_DATABASE: testdb
174+
MYSQL_USER: testuser
175+
MYSQL_PASSWORD: passw0rd
176+
# Set health checks to wait until mysql service has started
177+
options: >-
178+
--health-cmd "mysqladmin ping"
179+
--health-interval 10s
180+
--health-timeout 3s
181+
--health-retries 4
182+
183+
steps:
184+
- uses: actions/checkout@v2
185+
186+
- name: Install ${{ matrix.compiler }}
187+
uses: dlang-community/setup-dlang@v1
188+
with:
189+
compiler: ${{ matrix.compiler }}
190+
191+
- name: Set up test connection string
192+
env:
193+
MYSQL_PORT: ${{ job.services.mysql.ports[3306] }}
194+
run: |
195+
echo "host=localhost;port=$MYSQL_PORT;user=testuser;pwd=passw0rd;db=testdb" > testConnectionStr.txt
196+
197+
- name: Run unittests with Vibe.d
198+
run: |
199+
dub run ":integration-tests-vibe"
200+
201+
- name: Run unittests with Phobos
202+
run: |
203+
dub run ":integration-tests-phobos"
204+
205+
- name: Run test connection utility
206+
env:
207+
MYSQL_PORT: ${{ job.services.mysql.ports[3306] }}
208+
run: |
209+
dub run ":testconn" -- "host=localhost;port=$MYSQL_PORT;user=testuser;pwd=passw0rd;db=testdb"
210+
211+
- name: Build The Example Project
212+
working-directory: ./examples/homePage
213+
run: dub build
214+
215+
- name: Run Example (MySQL 5.6)
216+
working-directory: ./examples/homePage
217+
env:
218+
MYSQL_PORT: ${{ job.services.mysql.ports[3306] }}
219+
run: |
220+
./example "host=localhost;port=$MYSQL_PORT;user=testuser;pwd=passw0rd;db=testdb"
221+
151222
mariadb10-tests:
152223
name: MariaDB 10 Tests ${{ matrix.compiler }}
153224
strategy:

0 commit comments

Comments
 (0)