Test PHP 8.1 (#14109)

* Test PHP 8.1
Would love to remove the PHP7 versions, but we need to update our minimum version first.

* Try mariadb 10.8

* Reduce the number of open connections during testing.
This commit is contained in:
Tony Murray 2022-07-20 08:27:57 -05:00 committed by GitHub
parent 9320e6cd06
commit 98da97c816
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
3 changed files with 17 additions and 1 deletions

View File

@ -25,13 +25,18 @@ jobs:
fail-fast: false
matrix:
include:
-
php-version: 8.1
name: Unit
skip-web-check: 1
database: mariadb:10.8
-
php-version: 8.0
name: Unit
skip-web-check: 1
database: mariadb:10.5
-
php-version: 8.0
php-version: 8.1
name: Web
skip-unit-check: 1
database: mysql:5.7

View File

@ -35,4 +35,13 @@ abstract class TestCase extends BaseTestCase
}
}
}
protected function tearDown(): void
{
$this->beforeApplicationDestroyed(function () {
$this->getConnection()->disconnect();
});
parent::tearDown();
}
}

View File

@ -83,3 +83,5 @@ if (getenv('DBTEST')) {
Config::reload(); // reload the config including database config
\LibreNMS\Util\OS::updateCache(true); // Force update of OS Cache
app()->terminate(); // destroy the bootstrap Laravel application