File tree Expand file tree Collapse file tree 1 file changed +24
-2
lines changed Expand file tree Collapse file tree 1 file changed +24
-2
lines changed Original file line number Diff line number Diff line change 9393 - ldc-1.20.1 # eq to dmd v2.090.1
9494 - ldc-1.19.0 # eq to dmd v2.089.1
9595 runs-on : ${{ matrix.os }}
96+
97+ services :
98+ mysql :
99+ image : mysql:5.7
100+ ports : [3306]
101+ # Set the connection details to match testConnectionStr.txt
102+ env :
103+ MYSQL_ROOT_PASSWORD : f48dfhw3Hd!Asah7i2aZ
104+ MYSQL_DATABASE : mysqln_testdb
105+ MYSQL_USER : mysqln_test
106+ MYSQL_PASSWORD : pass123
107+ # Set health checks to wait until mysql service has started
108+ options : >-
109+ --health-cmd "mysqladmin ping"
110+ --health-interval 10s
111+ --health-timeout 3s
112+ --health-retries 4
113+
96114 steps :
97115 - uses : actions/checkout@v2
98116
@@ -113,8 +131,12 @@ jobs:
113131
114132 # # Turns out the unittest-vibe-ut tried to connect to an actualy MySQL on 172.18.0.1 so it's not
115133 # # actually a unit test at all. It's an integration test and should be pulled out of the codebase.
116- # - name: Run unittest-vibe-ut
117- # run: dub run -c unittest-vibe-ut -- -t
134+ - name : Run unittest-vibe-ut
135+ env :
136+ MYSQL_PORT : ${{ job.services.mysql.ports[3306] }}
137+ run : |
138+ echo "host=localhost;port=$MYSQL_PORT;user=mysqln_test;pwd=pass123;db=mysqln_testdb" > testConnectionStr.txt
139+ dub run -c unittest-vibe-ut -- -t
118140
119141 # cache
120142 - uses : WebFreak001/dub-upgrade@v0.1
You can’t perform that action at this time.
0 commit comments