diff --git a/.github/workflows/ci.yml b/.github/workflows/ci.yml index 536c5356a..67540409e 100644 --- a/.github/workflows/ci.yml +++ b/.github/workflows/ci.yml @@ -49,4 +49,6 @@ jobs: run: npm run test:unit - name: PHP Unit Tests - run: make test + run: | + git clone --depth 1 https://github.com/nextcloud/server.git -b v23.0.0 + make test diff --git a/bootstrap.php b/bootstrap.php index a53a72fdd..684dcbc01 100644 --- a/bootstrap.php +++ b/bootstrap.php @@ -3,11 +3,16 @@ use Composer\Autoload\ClassLoader; include_once __DIR__.'/vendor/autoload.php'; +if (file_exists(__DIR__ . '/server')) { + $serverPath = __DIR__ . '/server'; +} else { + $serverPath = __DIR__ . '/../..'; +} $classLoader = new ClassLoader(); $classLoader->addPsr4("OCA\\OpenProject\\Service\\", __DIR__ . '/lib/Service', true); -$classLoader->addPsr4("OCP\\", __DIR__ . '/../../lib/public', true); -$classLoader->addPsr4("OC\\", __DIR__ . '/../../lib/private', true); +$classLoader->addPsr4("OCP\\", $serverPath . '/lib/public', true); +$classLoader->addPsr4("OC\\", $serverPath . '/lib/private', true); $classLoader->addPsr4("OCA\\OpenProject\\AppInfo\\", __DIR__ . '/lib/AppInfo', true); $classLoader->register();