Skip to content

Commit f4438a2

Browse files
committed
workflows bugfix wiped database
1 parent 0af2012 commit f4438a2

File tree

2 files changed

+43
-6
lines changed

2 files changed

+43
-6
lines changed

.github/workflows/vcpkg-linux-drivers.yml

Lines changed: 19 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -180,6 +180,25 @@ jobs:
180180
run: |
181181
mkdir --parents '../HelloWorld-builds-cmake'
182182
183+
# The linux-qt6-drivers.yml workflow calls migrate:fresh and it calls the db:wipe internally,
184+
# so we need a freshly migrated MySQL database, I should use fresh database anyway.
185+
# The tom_testdata binary lives in the /usr/local/bin/ and it's from GCC static Release build
186+
# build-TinyDrivers-gcc13-Static-release, I don't need the latest actual version build before.
187+
- name: Prepare MySQL database
188+
run: |
189+
tom_testdata migrate:fresh --database=tinyorm_testdata_tom_mysql --seed --drop-views
190+
env:
191+
DB_MYSQL_CHARSET: ${{ secrets.DB_MYSQL_CHARSET }}
192+
DB_MYSQL_COLLATION: ${{ secrets.DB_MYSQL_COLLATION }}
193+
DB_MYSQL_DATABASE: ${{ secrets.DB_MYSQL_DATABASE }}
194+
DB_MYSQL_HOST: ${{ secrets.DB_MYSQL_HOST_SELF }}
195+
DB_MYSQL_PASSWORD: ${{ secrets.DB_MYSQL_PASSWORD_SELF }}
196+
DB_MYSQL_SSL_CA: ${{ secrets.DB_MYSQL_DATA_SELF_LINUX }}/ca.pem
197+
DB_MYSQL_SSL_CERT: ${{ secrets.DB_MYSQL_DATA_SELF_LINUX }}/client-cert.pem
198+
DB_MYSQL_SSL_KEY: ${{ secrets.DB_MYSQL_DATA_SELF_LINUX }}/client-key.pem
199+
DB_MYSQL_SSL_MODE: ${{ secrets.DB_MYSQL_SSL_MODE }}
200+
DB_MYSQL_USERNAME: ${{ secrets.DB_MYSQL_USERNAME_SELF }}
201+
183202
# VcpkgManifest method (no install or deployment)
184203
# ---
185204

.github/workflows/vcpkg-windows-drivers.yml

Lines changed: 24 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -225,6 +225,30 @@ jobs:
225225
New-Item -Type Directory $buildTreesPath
226226
}
227227
228+
# The tom_testdata.exe, FetchContent, and Manual methods below need Qt installed and to be
229+
# accessible on the system
230+
- name: ${{ matrix.qt.name }} prepare environment
231+
run: |
232+
"$env:TINY_QT_ROOT\${{ matrix.qt.version }}\msvc2019_64\bin" >> $env:GITHUB_PATH
233+
234+
# The msvc2022-qt6-drivers.yml workflow calls migrate:fresh and it calls the db:wipe internally,
235+
# so we need a freshly migrated MySQL database, I should use fresh database anyway
236+
- name: Prepare MySQL database
237+
working-directory: E:/dotfiles/bin
238+
run: |
239+
.\tom_testdata.exe migrate:fresh --database=tinyorm_testdata_tom_mysql --seed --drop-views
240+
env:
241+
DB_MYSQL_CHARSET: ${{ secrets.DB_MYSQL_CHARSET }}
242+
DB_MYSQL_COLLATION: ${{ secrets.DB_MYSQL_COLLATION }}
243+
DB_MYSQL_DATABASE: ${{ secrets.DB_MYSQL_DATABASE }}
244+
DB_MYSQL_HOST: ${{ secrets.DB_MYSQL_HOST_SELF }}
245+
DB_MYSQL_PASSWORD: ${{ secrets.DB_MYSQL_PASSWORD_SELF }}
246+
DB_MYSQL_SSL_CA: ${{ secrets.DB_MYSQL_DATA_SELF_WINDOWS }}/ca.pem
247+
DB_MYSQL_SSL_CERT: ${{ secrets.DB_MYSQL_DATA_SELF_WINDOWS }}/client-cert.pem
248+
DB_MYSQL_SSL_KEY: ${{ secrets.DB_MYSQL_DATA_SELF_WINDOWS }}/client-key.pem
249+
DB_MYSQL_SSL_MODE: ${{ secrets.DB_MYSQL_SSL_MODE }}
250+
DB_MYSQL_USERNAME: ${{ secrets.DB_MYSQL_USERNAME_SELF }}
251+
228252
# VcpkgManifest method with the VCPKG_APPLOCAL_DEPS (no install or deployment)
229253
# ---
230254

@@ -278,12 +302,6 @@ jobs:
278302
DB_MYSQL_SSL_MODE: ${{ secrets.DB_MYSQL_SSL_MODE }}
279303
DB_MYSQL_USERNAME: ${{ secrets.DB_MYSQL_USERNAME_SELF }}
280304

281-
# The FetchContent and Manual methods below need Qt installed and to be accessible on the system
282-
283-
- name: ${{ matrix.qt.name }} prepare environment
284-
run: |
285-
"$env:TINY_QT_ROOT\${{ matrix.qt.version }}\msvc2019_64\bin" >> $env:GITHUB_PATH
286-
287305
# Prepare ccache
288306
#
289307
# The TinyORM build in the Manual method and the FetchContent method are using the ccache,

0 commit comments

Comments
 (0)