@@ -148,6 +148,71 @@ 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 : Install dependencies on Ubuntu
192+ if : startsWith(matrix.os, 'ubuntu')
193+ run : sudo apt-get update && sudo apt-get install libevent-dev -y
194+
195+ # # Turns out the unittest-vibe-ut tried to connect to an actualy MySQL on 172.18.0.1 so it's not
196+ # # actually a unit test at all. It's an integration test and should be pulled out from the main
197+ # # codebase into a separate sub module
198+ - name : Run unittest-vibe-ut
199+ env :
200+ MYSQL_PORT : ${{ job.services.mysql.ports[3306] }}
201+ run : |
202+ echo "host=localhost;port=$MYSQL_PORT;user=testuser;pwd=passw0rd;db=testdb" > testConnectionStr.txt
203+ dub run -c unittest-vibe-ut -- -t
204+
205+ - name : Build The Example Project
206+ working-directory : ./examples/homePage
207+ run : dub build
208+
209+ - name : Run Example (MySQL 5.6)
210+ working-directory : ./examples/homePage
211+ env :
212+ MYSQL_PORT : ${{ job.services.mysql.ports[3306] }}
213+ run : |
214+ ./example "host=localhost;port=$MYSQL_PORT;user=testuser;pwd=passw0rd;db=testdb"
215+
151216 mariadb10-tests :
152217 name : MariaDB 10 Tests ${{ matrix.compiler }}
153218 strategy :
0 commit comments