From 1bc430830caeb6efec8c71cf6fa5a16d28b74a92 Mon Sep 17 00:00:00 2001 From: san7890 Date: Sat, 21 Jun 2025 19:52:24 -0600 Subject: [PATCH] Remove mysql insecure warning in CI (#91739) ## About The Pull Request ![image](https://github.com/user-attachments/assets/e8007e11-fc54-4f31-905e-2249481cd0a0) This warning thing has been annoying me for a while when I scour CI logs looking for oranges/reds, let's remove this needless emission by confabulating a `.cfg` file and using that to run any necessary commands. This worked on my local repository and should pass CI without any issues on this repo as well. ## Why It's Good For The Game In case we really wanna start cracking down on failing due to warnings in CI it's helpful to ensure that the standard case is normal. Also just cleaner in general. ## Changelog Not needed. --- .github/workflows/run_integration_tests.yml | 11 +++++++---- tools/ci/mysql_config.cnf | 3 +++ 2 files changed, 10 insertions(+), 4 deletions(-) create mode 100644 tools/ci/mysql_config.cnf diff --git a/.github/workflows/run_integration_tests.yml b/.github/workflows/run_integration_tests.yml index 07af59a8730..ad8a7fee823 100644 --- a/.github/workflows/run_integration_tests.yml +++ b/.github/workflows/run_integration_tests.yml @@ -41,12 +41,15 @@ jobs: name: build-artifact-${{ inputs.major || env.BYOND_MAJOR }}-${{ inputs.minor || env.BYOND_MINOR}} path: ./ - name: Setup database + env: + MYSQL_CONFIG_FILE: tools/ci/mysql_config.cnf run: | sudo systemctl start mysql - mysql -u root -proot -e 'CREATE DATABASE tg_ci;' - mysql -u root -proot tg_ci < SQL/tgstation_schema.sql - mysql -u root -proot -e 'CREATE DATABASE tg_ci_prefixed;' - mysql -u root -proot tg_ci_prefixed < SQL/tgstation_schema_prefixed.sql + mysql --defaults-extra-file=${{ env.MYSQL_CONFIG_FILE }} -e 'CREATE DATABASE tg_ci;' + mysql --defaults-extra-file=${{ env.MYSQL_CONFIG_FILE }} tg_ci < SQL/tgstation_schema.sql + mysql --defaults-extra-file=${{ env.MYSQL_CONFIG_FILE }} -e 'CREATE DATABASE tg_ci_prefixed;' + mysql --defaults-extra-file=${{ env.MYSQL_CONFIG_FILE }} tg_ci_prefixed < SQL/tgstation_schema_prefixed.sql + echo "Sucessful MySQL Database Setup" - name: Install rust-g run: | bash tools/ci/install_rust_g.sh diff --git a/tools/ci/mysql_config.cnf b/tools/ci/mysql_config.cnf new file mode 100644 index 00000000000..4ce75db56f6 --- /dev/null +++ b/tools/ci/mysql_config.cnf @@ -0,0 +1,3 @@ +[client] +user = "root" +password = "root"