27 Commits

Author SHA1 Message Date
Sebastian 74a8c4b73d chore(deps): update dependency jsdom to v30
Build Test / test (pull_request) Successful in 34s
JS Unit Tests / test (pull_request) Successful in 30s
PHP Integration Tests / Integration Tests (pull_request) Failing after 2m40s
PHP Unit Tests / test (pull_request) Successful in 2m37s
2026-07-28 03:02:09 +00:00
Sebastian 4715c76e37 refactor: migrate to scoped execution contexts
Signed-off-by: Sebastian Krupinski <krupinski01@gmail.com>
2026-07-27 00:50:43 -04:00
Sebastian 939c16a714 Merge pull request 'chore: implement js test suites' (#32) from chore/js-test-suites into main
Reviewed-on: #32
2026-07-24 04:20:15 +00:00
Sebastian 2c0c788ed7 chore: implement js test suites
JS Unit Tests / test (pull_request) Successful in 40s
Build Test / test (pull_request) Successful in 42s
PHP Integration Tests / Integration Tests (pull_request) Successful in 1m23s
PHP Unit Tests / test (pull_request) Successful in 1m31s
Signed-off-by: Sebastian Krupinski <krupinski01@gmail.com>
2026-07-24 00:13:52 -04:00
Sebastian 45a1690b87 Merge pull request 'chore(deps): update mongo docker tag to v8' (#31) from renovate/mongo-8.x into main
Reviewed-on: #31
2026-07-24 03:26:05 +00:00
Sebastian e631a9ba91 chore(deps): update mongo docker tag to v8
PHP Integration Tests / Integration Tests (pull_request) Successful in 1m21s
PHP Unit Tests / test (pull_request) Successful in 1m24s
2026-07-24 03:13:43 +00:00
Sebastian 303dc4eec4 Merge pull request 'chore(deps): update dependency pinia to v4.0.2' (#27) from renovate/pinia-4.x-lockfile into main
Reviewed-on: #27
2026-07-24 02:38:19 +00:00
Sebastian e80da25548 Merge pull request 'chore(deps): update dependency vue-tsc to v3.3.8' (#28) from renovate/vue-language-tools-monorepo into main
Reviewed-on: #28
2026-07-24 02:38:14 +00:00
Sebastian 4186be196d Merge pull request 'chore: implement php test suites' (#29) from chore/php83-test-suites into main
Reviewed-on: #29
2026-07-24 02:38:08 +00:00
Sebastian 97e9c6e693 fix: install module dependencies before running integration tests
PHP Unit Tests / test (pull_request) Successful in 1m16s
PHP Integration Tests / Integration Tests (pull_request) Successful in 3m9s
Signed-off-by: Sebastian Krupinski <krupinski01@gmail.com>
2026-07-23 22:32:08 -04:00
Sebastian 7cc6cb8807 chore: implement php test suites
PHP Unit Tests / test (pull_request) Successful in 1m25s
PHP Integration Tests / Integration Tests (pull_request) Failing after 1m25s
Signed-off-by: Sebastian Krupinski <krupinski01@gmail.com>
2026-07-23 22:20:36 -04:00
Sebastian c3109ef9c6 chore(deps): update dependency vue-tsc to v3.3.8 2026-07-23 03:06:08 +00:00
Sebastian 5657cce1f4 chore(deps): update dependency pinia to v4.0.2 2026-07-18 03:03:19 +00:00
Sebastian ea4d1a5af4 Merge pull request 'fix(deps): update dependency sabre/vobject to v5' (#25) from renovate/sabre-vobject-5.x into main
Reviewed-on: #25
2026-07-17 23:18:56 +00:00
Sebastian ca4f76e1e3 Merge pull request 'fix(deps): update dependency pinia to v4' (#26) from renovate/pinia-4.x into main
Reviewed-on: #26
2026-07-17 23:18:50 +00:00
Sebastian 8d1ebdcce1 Merge pull request 'chore(deps): update dependency vite to v8.1.5' (#24) from renovate/vite-8.x-lockfile into main
Reviewed-on: #24
2026-07-17 23:18:44 +00:00
Sebastian 2d98e92e83 chore(deps): update dependency vite to v8.1.5 2026-07-17 03:08:18 +00:00
Sebastian e79f067410 fix(deps): update dependency pinia to v4 2026-07-15 03:08:10 +00:00
Sebastian 5fa7fdb637 fix(deps): update dependency sabre/vobject to v5 2026-07-10 03:08:23 +00:00
Sebastian e562a7a36f fix(renovate): install renovate in runner temp
Signed-off-by: Sebastian Krupinski <krupinski01@gmail.com>
2026-07-09 20:12:07 -04:00
Sebastian 88aa55c2fa Merge pull request 'chore(deps): update dependency vue-tsc to v3.3.7' (#20) from renovate/vue-language-tools-monorepo into main
Reviewed-on: #20
2026-07-09 23:47:42 +00:00
Sebastian 2b5453e9e9 Merge pull request 'chore(deps): update dependency sabre/vobject to v4.6.1' (#22) from renovate/sabre-vobject-4.x-lockfile into main
Reviewed-on: #22
2026-07-09 23:47:35 +00:00
Sebastian 039185ddeb Merge pull request 'chore(deps): update dependency vite to v8.1.3' (#21) from renovate/vite-8.x-lockfile into main
Reviewed-on: #21
2026-07-09 23:47:22 +00:00
Sebastian 140f5f3a38 Merge pull request 'chore(deps): update dependency typescript to v7' (#23) from renovate/typescript-7.x into main
Reviewed-on: #23
2026-07-09 23:47:15 +00:00
Sebastian eab51886bb chore(deps): update dependency typescript to v7 2026-07-09 03:04:24 +00:00
Sebastian b76fe30a19 chore(deps): update dependency vue-tsc to v3.3.7 2026-07-09 03:04:17 +00:00
Sebastian 1cf5095a86 chore(deps): update dependency sabre/vobject to v4.6.1 2026-07-09 03:04:14 +00:00
17 changed files with 3270 additions and 143 deletions
+42
View File
@@ -0,0 +1,42 @@
name: Build Test
on:
pull_request:
jobs:
test:
runs-on: ubuntu-latest
steps:
- name: Retrieve Server Install Action
uses: actions/checkout@v6.0.2
with:
repository: Nodarx/action-server-install
ref: main
path: action-server-install
github-server-url: https://git.ktrix.dev
- name: Install Server
uses: ./action-server-install
with:
install-php: 'false'
install-node: 'true'
php-version: '8.5'
node-version: '24'
server-path: './server'
- name: Checkout Pull Request
uses: actions/checkout@v6.0.2
with:
repository: ${{ github.repository }}
ref: ${{ github.event.pull_request.head.sha }}
path: server/modules/people_manager
github-server-url: https://git.ktrix.dev
- name: Install dependencies
run: npm ci
working-directory: server/modules/people_manager
- name: Build
run: npm run build
working-directory: server/modules/people_manager
+42
View File
@@ -0,0 +1,42 @@
name: JS Unit Tests
on:
pull_request:
jobs:
test:
runs-on: ubuntu-latest
steps:
- name: Retrieve Server Install Action
uses: actions/checkout@v6.0.2
with:
repository: Nodarx/action-server-install
ref: main
path: action-server-install
github-server-url: https://git.ktrix.dev
- name: Install Server
uses: ./action-server-install
with:
install-php: 'false'
install-node: 'true'
php-version: '8.5'
node-version: '24'
server-path: './server'
- name: Checkout Pull Request
uses: actions/checkout@v6.0.2
with:
repository: ${{ github.repository }}
ref: ${{ github.event.pull_request.head.sha }}
path: server/modules/people_manager
github-server-url: https://git.ktrix.dev
- name: Install dependencies
run: npm ci
working-directory: server/modules/people_manager
- name: Run tests
run: npm run test:unit
working-directory: server/modules/people_manager
@@ -0,0 +1,59 @@
name: PHP Integration Tests
on:
pull_request:
workflow_dispatch:
jobs:
test:
name: Integration Tests
runs-on: ubuntu-latest
services:
mongo:
image: mongo:8
options: >-
--health-cmd "mongosh --quiet --eval \"db.adminCommand('ping')\""
--health-interval 5s
--health-timeout 5s
--health-retries 12
steps:
- name: Retrieve Server Install Action
uses: actions/checkout@v6.0.2
with:
repository: Nodarx/action-server-install
ref: main
path: action-server-install
github-server-url: https://git.ktrix.dev
- name: Install server
uses: ./action-server-install
with:
install-php: 'true'
php-version: '8.5'
server-path: './server'
database-uri: 'mongodb://mongo:27017/?tls=false'
database-name: 'ktrix_ci'
app-environment: 'test'
- name: Checkout module under test
uses: actions/checkout@v6.0.2
with:
repository: ${{ github.repository }}
ref: ${{ github.event.pull_request.head.sha || github.sha }}
path: server/modules/people_manager
github-server-url: https://git.ktrix.dev
- name: Install module dependencies
run: composer install --prefer-dist --no-progress
working-directory: server/modules/people_manager
- name: Install and enable module
working-directory: server
run: |
php bin/console module:install people_manager
php bin/console module:enable people_manager
- name: Run integration tests
working-directory: server/modules/people_manager
run: composer test:integration
+42
View File
@@ -0,0 +1,42 @@
name: PHP Unit Tests
on:
pull_request:
jobs:
test:
runs-on: ubuntu-latest
steps:
- name: Retrieve Server Install Action
uses: actions/checkout@v6.0.2
with:
repository: Nodarx/action-server-install
ref: main
path: action-server-install
github-server-url: https://git.ktrix.dev
- name: Install Server
uses: ./action-server-install
with:
install-php: 'true'
install-node: 'false'
php-version: '8.5'
node-version: '24'
server-path: './server'
- name: Checkout Pull Request
uses: actions/checkout@v6.0.2
with:
repository: ${{ github.repository }}
ref: ${{ github.event.pull_request.head.sha }}
path: server/modules/people_manager
github-server-url: https://git.ktrix.dev
- name: Install dependencies
run: composer install --prefer-dist --no-progress
working-directory: server/modules/people_manager
- name: Run tests
run: composer test:unit
working-directory: server/modules/people_manager
+8 -2
View File
@@ -25,11 +25,17 @@ jobs:
tools: composer:v2 tools: composer:v2
- name: Install Renovate - name: Install Renovate
run: npm install -g renovate run: |
npm install --global --no-audit --fund=false \
--prefix "${{ runner.temp }}/renovate-npm" \
--cache "${{ runner.temp }}/renovate-npm-cache" \
renovate
"${{ runner.temp }}/renovate-npm/bin/renovate" --version
- name: Run Renovate - name: Run Renovate
env: env:
RENOVATE_TOKEN: ${{ secrets.RENOVATE_TOKEN }} RENOVATE_TOKEN: ${{ secrets.RENOVATE_TOKEN }}
RENOVATE_PLATFORM: gitea RENOVATE_PLATFORM: gitea
RENOVATE_ENDPOINT: https://git.ktrix.dev/api/v1 RENOVATE_ENDPOINT: https://git.ktrix.dev/api/v1
run: renovate ${{ gitea.repository }} run: |
"${{ runner.temp }}/renovate-npm/bin/renovate" ${{ gitea.repository }}
+1 -4
View File
@@ -14,10 +14,7 @@ node_modules/
# Backend development # Backend development
/lib/vendor/ /lib/vendor/
coverage/ coverage/
phpunit.xml.cache *.cache
.phpunit.result.cache
.php-cs-fixer.cache
.phpstan.cache
.phpactor/ .phpactor/
# Editors # Editors
+15 -3
View File
@@ -10,18 +10,30 @@
"config": { "config": {
"optimize-autoloader": true, "optimize-autoloader": true,
"platform": { "platform": {
"php": "8.2" "php": "8.3"
}, },
"autoloader-suffix": "PeopleManager", "autoloader-suffix": "PeopleManager",
"vendor-dir": "lib/vendor" "vendor-dir": "lib/vendor"
}, },
"require": { "require": {
"php": ">=8.2 <=8.5", "php": ">=8.3 <=8.5",
"sabre/vobject": "^4.5" "sabre/vobject": "^5.0"
},
"require-dev": {
"phpunit/phpunit": "^12.0"
}, },
"autoload": { "autoload": {
"psr-4": { "psr-4": {
"KTXM\\PeopleManager\\": "lib/" "KTXM\\PeopleManager\\": "lib/"
} }
},
"autoload-dev": {
"psr-4": {
"KTXT\\PeopleManager\\Tests\\": "tests/php/"
}
},
"scripts": {
"test:unit": "phpunit --configuration tests/php/phpunit.xml --testsuite \"Unit Tests\" --colors=always --testdox",
"test:integration": "phpunit --configuration tests/php/phpunit.xml --testsuite \"Integration Tests\" --colors=always --testdox"
} }
} }
Generated
+1702 -15
View File
File diff suppressed because it is too large Load Diff
+6 -6
View File
@@ -13,8 +13,8 @@ use InvalidArgumentException;
use KTXC\Http\Response\JsonResponse; use KTXC\Http\Response\JsonResponse;
use KTXC\Http\Response\Response; use KTXC\Http\Response\Response;
use KTXC\Http\Response\StreamedNdJsonResponse; use KTXC\Http\Response\StreamedNdJsonResponse;
use KTXC\SessionIdentity; use KTXC\Context\IdentityContextInterface;
use KTXC\SessionTenant; use KTXC\Context\TenantContextInterface;
use KTXF\Controller\ControllerAbstract; use KTXF\Controller\ControllerAbstract;
use KTXF\Json\JsonSerializable; use KTXF\Json\JsonSerializable;
use KTXF\Resource\Identifier\CollectionIdentifier; use KTXF\Resource\Identifier\CollectionIdentifier;
@@ -49,8 +49,8 @@ class DefaultController extends ControllerAbstract {
private const ERR_INVALID_DATA = 'Invalid parameter: data must be an array'; private const ERR_INVALID_DATA = 'Invalid parameter: data must be an array';
public function __construct( public function __construct(
private readonly SessionTenant $tenantIdentity, private readonly TenantContextInterface $tenantContext,
private readonly SessionIdentity $userIdentity, private readonly IdentityContextInterface $identityContext,
private readonly Manager $manager, private readonly Manager $manager,
private readonly ImportService $importService, private readonly ImportService $importService,
private readonly LoggerInterface $logger, private readonly LoggerInterface $logger,
@@ -79,8 +79,8 @@ class DefaultController extends ControllerAbstract {
): Response { ): Response {
// authorize request // authorize request
$tenantId = $this->tenantIdentity->identifier(); $tenantId = $this->tenantContext->identifier();
$userId = $this->userIdentity->identifier(); $userId = $this->identityContext->identifier();
try { try {
+1167 -111
View File
File diff suppressed because it is too large Load Diff
+10 -3
View File
@@ -10,15 +10,22 @@
"build": "vite build --mode production --config vite.config.ts", "build": "vite build --mode production --config vite.config.ts",
"dev": "vite build --mode development --config vite.config.ts", "dev": "vite build --mode development --config vite.config.ts",
"watch": "vite build --mode development --watch --config vite.config.ts", "watch": "vite build --mode development --watch --config vite.config.ts",
"typecheck": "vue-tsc --noEmit" "typecheck": "vue-tsc --noEmit",
"test": "vitest run --config tests/js/vitest.config.ts",
"test:unit": "vitest run --config tests/js/vitest.config.ts",
"test:watch": "vitest watch --config tests/js/vitest.config.ts",
"test:coverage": "vitest run --coverage --config tests/js/vitest.config.ts"
}, },
"dependencies": { "dependencies": {
"pinia": "^3.0.0" "pinia": "^4.0.0"
}, },
"devDependencies": { "devDependencies": {
"@vue/tsconfig": "^0.9.0", "@vue/tsconfig": "^0.9.0",
"typescript": "~6.0.0", "typescript": "~6.0.0",
"vite": "^8.0.0", "vite": "^8.0.0",
"vue-tsc": "^3.0.5" "vue-tsc": "^3.0.5",
"@vitest/coverage-v8": "^4.1.6",
"jsdom": "^30.0.0",
"vitest": "^4.1.6"
} }
} }
+30
View File
@@ -0,0 +1,30 @@
import { describe, it, expect } from 'vitest'
describe('Basic Tests', () => {
it('should perform basic assertion', () => {
expect(true).toBe(true)
})
it('should test array operations', () => {
const array = ['foo', 'bar', 'baz']
expect(array).toHaveLength(3)
expect(array).toContain('bar')
expect(array[0]).toBe('foo')
})
it('should test string operations', () => {
const string = 'Hello, World!'
expect(string).toContain('World')
expect(string.length).toBe(13)
})
it('should test object operations', () => {
const obj = { foo: 'bar', count: 42 }
expect(obj).toHaveProperty('foo')
expect(obj.foo).toBe('bar')
expect(obj.count).toBeGreaterThan(40)
})
})
+31
View File
@@ -0,0 +1,31 @@
import { fileURLToPath } from 'node:url'
import { defineConfig, configDefaults } from 'vitest/config'
import path from 'path'
const __filename = fileURLToPath(import.meta.url)
const __dirname = path.dirname(__filename)
export default defineConfig({
resolve: {
alias: {
'@': path.resolve(__dirname, '../../src'),
'@KTXC': path.resolve(__dirname, '../../../../core/src'),
},
},
test: {
environment: 'jsdom',
exclude: [...configDefaults.exclude, 'e2e/**'],
root: fileURLToPath(new URL('../../', import.meta.url)),
coverage: {
provider: 'v8',
reporter: ['text', 'json', 'html'],
exclude: [
'node_modules/',
'tests/',
'**/*.d.ts',
'**/*.config.*',
'**/dist/**',
],
},
},
})
+29
View File
@@ -0,0 +1,29 @@
<?php
namespace KTXT\PeopleManager\Tests\Integration;
use PHPUnit\Framework\TestCase;
class BaseTest extends TestCase
{
public function testBasicAssertion(): void
{
$this->assertTrue(true);
}
public function testArrayOperations(): void
{
$array = ['foo' => 'bar'];
$this->assertArrayHasKey('foo', $array);
$this->assertEquals('bar', $array['foo']);
}
public function testStringOperations(): void
{
$string = 'Hello, World!';
$this->assertStringContainsString('World', $string);
$this->assertEquals(13, strlen($string));
}
}
+29
View File
@@ -0,0 +1,29 @@
<?php
namespace KTXT\PeopleManager\Tests\Unit;
use PHPUnit\Framework\TestCase;
class BaseTest extends TestCase
{
public function testBasicAssertion(): void
{
$this->assertTrue(true);
}
public function testArrayOperations(): void
{
$array = ['foo' => 'bar'];
$this->assertArrayHasKey('foo', $array);
$this->assertEquals('bar', $array['foo']);
}
public function testStringOperations(): void
{
$string = 'Hello, World!';
$this->assertStringContainsString('World', $string);
$this->assertEquals(13, strlen($string));
}
}
+17
View File
@@ -0,0 +1,17 @@
<?php
require dirname(__DIR__, 2).'/lib/vendor/autoload.php';
// When this module is checked out inside a full server (server/modules/<handle>,
// as it is in CI and in this monorepo checkout), also load the server's own
// core/shared autoloader so tests can reference framework (KTXC/KTXF) types.
// Standalone module checkouts without a server alongside them skip this.
define('SERVER_ROOT', dirname(__DIR__, 4));
$serverAutoload = SERVER_ROOT . '/vendor/autoload.php';
if (is_file($serverAutoload)) {
require $serverAutoload;
}
if (isset($_SERVER['APP_DEBUG']) && $_SERVER['APP_DEBUG']) {
umask(0000);
}
+41
View File
@@ -0,0 +1,41 @@
<?xml version="1.0" encoding="UTF-8"?>
<!-- https://phpunit.readthedocs.io/en/latest/configuration.html -->
<phpunit xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
xsi:noNamespaceSchemaLocation="../../lib/vendor/phpunit/phpunit/phpunit.xsd"
colors="true"
failOnDeprecation="true"
failOnNotice="true"
failOnWarning="true"
bootstrap="bootstrap.php"
cacheDirectory="../../.phpunit.cache"
>
<php>
<ini name="display_errors" value="1" />
<ini name="error_reporting" value="-1" />
<server name="APP_ENV" value="test" force="true" />
<server name="SHELL_VERBOSITY" value="-1" />
</php>
<testsuites>
<testsuite name="Unit Tests">
<directory>Unit</directory>
</testsuite>
<testsuite name="Integration Tests">
<directory>Integration</directory>
</testsuite>
</testsuites>
<source ignoreSuppressionOfDeprecations="true"
ignoreIndirectDeprecations="true"
restrictNotices="true"
restrictWarnings="true"
>
<include>
<directory>../../lib</directory>
</include>
</source>
<extensions>
</extensions>
</phpunit>