From 577bc89a2e55de209f5e63ae25f737c0d61ea3fb Mon Sep 17 00:00:00 2001 From: silverqx Date: Wed, 1 May 2024 21:08:09 +0200 Subject: [PATCH] workflows bugfix wiped database --- .github/workflows/linux-qt6-drivers.yml | 6 ++++- .github/workflows/vcpkg-windows-drivers.yml | 30 ++++++++++++++++----- 2 files changed, 29 insertions(+), 7 deletions(-) diff --git a/.github/workflows/linux-qt6-drivers.yml b/.github/workflows/linux-qt6-drivers.yml index b54f6b44a..edf82ce18 100644 --- a/.github/workflows/linux-qt6-drivers.yml +++ b/.github/workflows/linux-qt6-drivers.yml @@ -218,12 +218,16 @@ jobs: DB_MYSQL_USERNAME: ${{ secrets.DB_MYSQL_USERNAME_SELF }} TOM_TESTS_ENV: ${{ vars.TOM_TESTS_ENV }} + # For now, don't call the migrate:fresh as it calls the db:wipe internally (removes all tables) + # so the vcpkg-linux-drivers.yml will fail. I don't have the qsdb command + # on the merydeye-tinyactions runner + # TODO workflows add qsdb on merydeye-tinyactions and uncomment migrate:fresh command silverqx - name: Tom example test some commands (MySQL) 🚀 working-directory: ${{ env.TinyORMBuildTree }}/examples/tom run: | export LD_LIBRARY_PATH=../..${LD_LIBRARY_PATH:+:}"$LD_LIBRARY_PATH" - ./tom migrate:fresh --database=tinyorm_tom_mysql --seed --no-ansi + # ./tom migrate:fresh --database=tinyorm_tom_mysql --seed --no-ansi ./tom migrate:uninstall --reset --database=tinyorm_tom_mysql --no-ansi ./tom migrate:install --database=tinyorm_tom_mysql --no-ansi ./tom migrate --database=tinyorm_tom_mysql --seed --no-ansi diff --git a/.github/workflows/vcpkg-windows-drivers.yml b/.github/workflows/vcpkg-windows-drivers.yml index e8e6b3338..ad389d833 100644 --- a/.github/workflows/vcpkg-windows-drivers.yml +++ b/.github/workflows/vcpkg-windows-drivers.yml @@ -225,6 +225,30 @@ jobs: New-Item -Type Directory $buildTreesPath } + # The tom_testdata.exe, FetchContent, and Manual methods below need Qt installed and to be + # accessible on the system + - name: ${{ matrix.qt.name }} prepare environment + run: | + "$env:TINY_QT_ROOT\${{ matrix.qt.version }}\msvc2019_64\bin" >> $env:GITHUB_PATH + + # The msvc2022-qt6-drivers.yml workflow calls migrate:fresh and it calls the db:wipe internally, + # so we need a fresh migrated MySQL database, I should use fresh database anyway + - name: Prepare MySQL database + working-directory: E:/dotfiles/bin + run: | + .\tom_testdata.exe migrate:fresh --database=tinyorm_testdata_tom_mysql --seed --drop-views + env: + DB_MYSQL_CHARSET: ${{ secrets.DB_MYSQL_CHARSET }} + DB_MYSQL_COLLATION: ${{ secrets.DB_MYSQL_COLLATION }} + DB_MYSQL_DATABASE: ${{ secrets.DB_MYSQL_DATABASE }} + DB_MYSQL_HOST: ${{ secrets.DB_MYSQL_HOST_SELF }} + DB_MYSQL_PASSWORD: ${{ secrets.DB_MYSQL_PASSWORD_SELF }} + DB_MYSQL_SSL_CA: ${{ secrets.DB_MYSQL_DATA_SELF_WINDOWS }}/ca.pem + DB_MYSQL_SSL_CERT: ${{ secrets.DB_MYSQL_DATA_SELF_WINDOWS }}/client-cert.pem + DB_MYSQL_SSL_KEY: ${{ secrets.DB_MYSQL_DATA_SELF_WINDOWS }}/client-key.pem + DB_MYSQL_SSL_MODE: ${{ secrets.DB_MYSQL_SSL_MODE }} + DB_MYSQL_USERNAME: ${{ secrets.DB_MYSQL_USERNAME_SELF }} + # VcpkgManifest method with the VCPKG_APPLOCAL_DEPS (no install or deployment) # --- @@ -278,12 +302,6 @@ jobs: DB_MYSQL_SSL_MODE: ${{ secrets.DB_MYSQL_SSL_MODE }} DB_MYSQL_USERNAME: ${{ secrets.DB_MYSQL_USERNAME_SELF }} - # The FetchContent and Manual methods below need Qt installed and to be accessible on the system - - - name: ${{ matrix.qt.name }} prepare environment - run: | - "$env:TINY_QT_ROOT\${{ matrix.qt.version }}\msvc2019_64\bin" >> $env:GITHUB_PATH - # Prepare ccache # # The TinyORM build in the Manual method and the FetchContent method are using the ccache,