Skip to content

Commit

Permalink
workflows bugfix wiped database
Browse files Browse the repository at this point in the history
  • Loading branch information
silverqx committed May 1, 2024
1 parent 0af2012 commit 577bc89
Show file tree
Hide file tree
Showing 2 changed files with 29 additions and 7 deletions.
6 changes: 5 additions & 1 deletion .github/workflows/linux-qt6-drivers.yml
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down
30 changes: 24 additions & 6 deletions .github/workflows/vcpkg-windows-drivers.yml
Original file line number Diff line number Diff line change
Expand Up @@ -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)
# ---

Expand Down Expand Up @@ -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,
Expand Down

0 comments on commit 577bc89

Please sign in to comment.