fix: restore full CI matrix and revert test/endpoint changes to 1.9.x

This commit is contained in:
Prem Palanisamy
2026-04-02 10:09:36 +02:00
parent cb9d3869f0
commit 52981e0164
20 changed files with 35 additions and 128 deletions
+28 -4
View File
@@ -218,9 +218,8 @@ jobs:
const decode = (content) => JSON.parse(Buffer.from(content, 'base64').toString());
const databaseChanged = getDbVersion(decode(base.content)) !== getDbVersion(decode(head.content));
// TEMP: Only run failing combinations for debugging
core.setOutput('databases', JSON.stringify(allDatabases));
core.setOutput('modes', JSON.stringify(allModes));
core.setOutput('databases', JSON.stringify(databaseChanged ? allDatabases : defaultDatabases));
core.setOutput('modes', JSON.stringify(databaseChanged ? allModes : defaultModes));
build:
name: Build
@@ -380,7 +379,32 @@ jobs:
matrix:
database: ${{ fromJSON(needs.matrix.outputs.databases) }}
mode: ${{ fromJSON(needs.matrix.outputs.modes) }}
service: [Realtime, Migrations, Projects, Databases, TablesDB]
service: [
Account,
Avatars,
Console,
Databases,
TablesDB,
Functions,
FunctionsSchedule,
GraphQL,
Health,
Locale,
Projects,
Realtime,
Sites,
Proxy,
Storage,
Tokens,
Teams,
Users,
ProjectWebhooks,
Webhooks,
VCS,
Messaging,
Migrations,
Project
]
include:
- service: Databases
runner: blacksmith-4vcpu-ubuntu-2404
@@ -130,9 +130,11 @@ class Create extends CollectionAction
$indexes[] = new Document($index);
}
try {
try {
$dbForDatabases->create();
} catch (DuplicateException) {
if (!$dbForDatabases->exists(null, Database::METADATA)) {
try {
$dbForDatabases->create();
} catch (DuplicateException) {
}
}
$dbForDatabases->createCollection(
id: 'database_' . $database->getSequence() . '_collection_' . $collection->getSequence(),
-10
View File
@@ -43,16 +43,6 @@ abstract class Scope extends TestCase
$this->client = null;
}
/**
* Skip test if the current database adapter doesn't match the required one.
*/
protected function requireAdapter(string $adapter): void
{
if (\getenv('_APP_DB_ADAPTER') !== $adapter) {
$this->markTestSkipped("Requires {$adapter} adapter");
}
}
/**
* @var array|null Cached console variables
*/
@@ -13,12 +13,6 @@ class DocumentsDBIndexTest extends Scope
use ProjectCustom;
use SideServer;
protected function setUp(): void
{
parent::setUp();
$this->requireAdapter('mongodb');
}
public function testCreateIndexes(): void
{
$database = $this->client->call(
@@ -13,10 +13,4 @@ class DocumentsDBConsoleClientTest extends Scope
use ProjectCustom;
use SideConsole;
use ApiDocumentsDB;
protected function setUp(): void
{
parent::setUp();
$this->requireAdapter('mongodb');
}
}
@@ -13,10 +13,4 @@ class DocumentsDBCustomClientTest extends Scope
use ProjectCustom;
use SideClient;
use ApiDocumentsDB;
protected function setUp(): void
{
parent::setUp();
$this->requireAdapter('mongodb');
}
}
@@ -13,10 +13,4 @@ class DocumentsDBCustomServerTest extends Scope
use ProjectCustom;
use SideServer;
use ApiDocumentsDB;
protected function setUp(): void
{
parent::setUp();
$this->requireAdapter('mongodb');
}
}
@@ -14,8 +14,6 @@ trait DatabasesBase
{
public function testCreateDatabase(): array
{
$this->requireAdapter('postgresql');
/**
* Test for SUCCESS
*/
@@ -18,12 +18,6 @@ class DatabasesPermissionsGuestTest extends Scope
use SideClient;
use DatabasesPermissionsScope;
protected function setUp(): void
{
parent::setUp();
$this->requireAdapter('postgresql');
}
private $authorization;
public function getAuthorization(): Authorization
@@ -18,12 +18,6 @@ class DatabasesPermissionsMemberTest extends Scope
use SideClient;
use DatabasesPermissionsScope;
protected function setUp(): void
{
parent::setUp();
$this->requireAdapter('postgresql');
}
public array $collections = [];
public function createUsers(): array
@@ -18,12 +18,6 @@ class DatabasesPermissionsTeamTest extends Scope
use SideClient;
use DatabasesPermissionsScope;
protected function setUp(): void
{
parent::setUp();
$this->requireAdapter('postgresql');
}
public array $collections = [];
public string $databaseId = 'testpermissiondb';
@@ -15,12 +15,6 @@ class ACIDTest extends Scope
use ProjectCustom;
use SideClient;
protected function setUp(): void
{
parent::setUp();
$this->requireAdapter('postgresql');
}
private function generateEmbeddings(int $dimensions = 3, float $value = 0.1): array
{
$vector = array_fill(0, $dimensions, $value);
@@ -11,10 +11,4 @@ class TransactionsConsoleClientTest extends Scope
use TransactionsBase;
use ProjectCustom;
use SideConsole;
protected function setUp(): void
{
parent::setUp();
$this->requireAdapter('postgresql');
}
}
@@ -11,10 +11,4 @@ class TransactionsCustomClientTest extends Scope
use TransactionsBase;
use ProjectCustom;
use SideClient;
protected function setUp(): void
{
parent::setUp();
$this->requireAdapter('postgresql');
}
}
@@ -11,10 +11,4 @@ class TransactionsCustomServerTest extends Scope
use TransactionsBase;
use ProjectCustom;
use SideServer;
protected function setUp(): void
{
parent::setUp();
$this->requireAdapter('postgresql');
}
}
@@ -17,12 +17,6 @@ class VectorsDBConsoleClientTest extends Scope
use ProjectCustom;
use SideConsole;
protected function setUp(): void
{
parent::setUp();
$this->requireAdapter('postgresql');
}
public function testCreateCollection(): array
{
$database = $this->client->call(Client::METHOD_POST, '/vectorsdb', array_merge([
@@ -17,12 +17,6 @@ class VectorsDBCustomClientTest extends Scope
use ProjectCustom;
use SideClient;
protected function setUp(): void
{
parent::setUp();
$this->requireAdapter('postgresql');
}
public function testAllowedPermissions(): void
{
/**
@@ -19,12 +19,6 @@ class VectorsDBCustomServerTest extends Scope
use ProjectCustom;
use SideServer;
protected function setUp(): void
{
parent::setUp();
$this->requireAdapter('postgresql');
}
public function testListDatabases(): array
{
$db1 = $this->client->call(Client::METHOD_POST, '/vectorsdb', [
@@ -2561,8 +2561,6 @@ trait MigrationsBase
*/
public function testImportVectordbCSV(): void
{
$this->requireAdapter('postgresql');
$databaseId = null;
$collectionId = null;
$bucketId = null;
@@ -2687,8 +2685,6 @@ trait MigrationsBase
#[Retry(count: 1)]
public function testExportVectordbCSV(): void
{
$this->requireAdapter('postgresql');
$databaseId = null;
try {
@@ -2821,8 +2817,6 @@ trait MigrationsBase
*/
public function testAppwriteMigrationDocumentsDBDatabase(): array
{
$this->requireAdapter('mongodb');
$response = $this->client->call(Client::METHOD_POST, '/documentsdb', [
'content-type' => 'application/json',
'x-appwrite-project' => $this->getProject()['$id'],
@@ -2885,8 +2879,6 @@ trait MigrationsBase
*/
public function testAppwriteMigrationVectorsDBDatabase(): array
{
$this->requireAdapter('postgresql');
$response = $this->client->call(Client::METHOD_POST, '/vectorsdb', [
'content-type' => 'application/json',
'x-appwrite-project' => $this->getProject()['$id'],
@@ -3207,8 +3199,6 @@ trait MigrationsBase
*/
public function testAppwriteMigrationMixedDatabases(): void
{
$this->requireAdapter('mongodb');
// Create a fresh isolated source project for this test
$sourceProject = $this->getProject(true);
@@ -4217,10 +4207,9 @@ trait MigrationsBase
}, 30_000, 500);
// Check that email was sent with download link
$lastEmail = $this->getLastEmail(probe: function ($email) {
$this->assertEquals('Your JSON export is ready', $email['subject']);
});
$lastEmail = $this->getLastEmail();
$this->assertNotEmpty($lastEmail);
$this->assertEquals('Your JSON export is ready', $lastEmail['subject']);
$this->assertStringContainsStringIgnoringCase('Your data export has been completed successfully', $lastEmail['text']);
// Extract download URL from email HTML
@@ -4261,8 +4250,6 @@ trait MigrationsBase
public function testCreateVectorsDBJSONExport(): void
{
$this->requireAdapter('postgresql');
$headers = [
'content-type' => 'application/json',
'x-appwrite-project' => $this->getProject()['$id'],
@@ -4327,8 +4314,6 @@ trait MigrationsBase
public function testCreateVectorsDBJSONImport(): void
{
$this->requireAdapter('postgresql');
$headers = [
'content-type' => 'application/json',
'x-appwrite-project' => $this->getProject()['$id'],
@@ -4409,8 +4394,6 @@ trait MigrationsBase
public function testCreateDocumentsDBJSONExport(): void
{
$this->requireAdapter('mongodb');
$headers = [
'content-type' => 'application/json',
'x-appwrite-project' => $this->getProject()['$id'],
@@ -4475,8 +4458,6 @@ trait MigrationsBase
public function testCreateDocumentsDBJSONImport(): void
{
$this->requireAdapter('mongodb');
$headers = [
'content-type' => 'application/json',
'x-appwrite-project' => $this->getProject()['$id'],
@@ -4598,8 +4598,6 @@ class RealtimeCustomClientTest extends Scope
}
public function testChannelDocumentsdb()
{
$this->requireAdapter('mongodb');
$user = $this->getUser();
$session = $user['session'] ?? '';
$projectId = $this->getProject()['$id'];
@@ -5078,8 +5076,6 @@ class RealtimeCustomClientTest extends Scope
public function testChannelVectorsDB()
{
$this->requireAdapter('postgresql');
$user = $this->getUser();
$session = $user['session'] ?? '';
$projectId = $this->getProject()['$id'];