mirror of
https://github.com/librenms/librenms.git
synced 2024-10-07 16:52:45 +00:00
GitHub Actions dev:check ci (#12392)
* Refactor test for GitHub Actions * Checkout pull request HEAD commit instead of merge commit * Fetch changed files from API instead of git * HEAD commit * Origin * Fix env * force full unit checks on gh actions change * Fix DB conn * Update test.yml * Also set port in PDO connection * Exit with correct exit code * Update CiHelper.php * Update test.yml * Update CiHelper.php * Update Proc.php * Cleanups Remove extra unit test run on php 7.4 Add names that will hopefully show in github. Remove redundant DB env variables. * Fix Shorter names and DB_TEST env is required * Change command for information purposes Co-authored-by: CrazyMax <crazy-max@users.noreply.github.com> Co-authored-by: Tony Murray <murraytony@gmail.com> Co-authored-by: Jellyfrog <Jellyfrog@users.noreply.github.com>
This commit is contained in:
@@ -54,7 +54,7 @@ if (getenv('DBTEST')) {
|
||||
|
||||
// create testing table if needed
|
||||
$db_config = \config('database.connections.testing');
|
||||
$connection = new PDO("mysql:host={$db_config['host']}", $db_config['username'], $db_config['password']);
|
||||
$connection = new PDO("mysql:host={$db_config['host']};port={$db_config['port']}", $db_config['username'], $db_config['password']);
|
||||
$result = $connection->query("CREATE DATABASE IF NOT EXISTS {$db_config['database']} CHARACTER SET utf8 COLLATE utf8_unicode_ci");
|
||||
if ($connection->errorCode() == '42000') {
|
||||
echo implode(' ', $connection->errorInfo()) . PHP_EOL;
|
||||
|
Reference in New Issue
Block a user