Compare commits
111 Commits
5fb19fc00a
..
main
| Author | SHA1 | Date | |
|---|---|---|---|
| fd57b5c9e7 | |||
| 7165a7e38a | |||
| 9787fd470e | |||
| e0dde2b33e | |||
| 7bed43b36e | |||
| 9f28f321bf | |||
| c025810ea8 | |||
| 42bc9f55ed | |||
| 4168172f68 | |||
| 42494ef680 | |||
| 9d798395d5 | |||
| 770c58dfb0 | |||
| 7bb4353fae | |||
| ad8067a530 | |||
| 38c060a9a9 | |||
| 85ffc6fb0d | |||
| 50535da347 | |||
| e7b1850a74 | |||
| 8266934198 | |||
| f0a1388155 | |||
| c387bc8501 | |||
| 8d121943a9 | |||
| 468045fb1c | |||
| 4326ae0bca | |||
| 6f760be919 | |||
| 129bbdef2d | |||
| 481d7bdb05 | |||
| 1a83237102 | |||
| 764420b4fc | |||
| 2858e6ed2f | |||
| 415c842696 | |||
| d787fbf358 | |||
| b763742da7 | |||
| 40421c10ca | |||
| 1d1e85571a | |||
| 08e5db5835 | |||
| 43b1cdf94f | |||
| 91f1b63201 | |||
| 8f01e1b361 | |||
| 4e586ab27d | |||
| 1827535ee8 | |||
| 9342299ea3 | |||
| 321a05be78 | |||
| efc93ef701 | |||
| a19deb8414 | |||
| 52a548355e | |||
| 20001f7a50 | |||
| 1324c3bb81 | |||
| 27435d7bf3 | |||
| 4b7b61d7b6 | |||
| 476b74a57e | |||
| 0c127cf847 | |||
| 8196b55292 | |||
| f75a05f3f6 | |||
| 9739f0b7d2 | |||
| 005a34e826 | |||
| f3aa4c61fc | |||
| 020306f8aa | |||
| e3a5c2f40d | |||
| cf361c1758 | |||
| 975f669747 | |||
| 4a3c02273a | |||
| 31e75ac53e | |||
| 842241bf65 | |||
| 5d819f2fa5 | |||
| 78d047b76c | |||
| 5c0a06be1f | |||
| d9b2f878f7 | |||
| ccf0e544eb | |||
| c51d4f3fd8 | |||
| 4577b5a9d4 | |||
| 5c4c2ea098 | |||
| 5e822cab54 | |||
| ebcb6fd27f | |||
| dce1543eb6 | |||
| 8afead78d8 | |||
| e067046380 | |||
| 4517c16ab1 | |||
| 75e25482d1 | |||
| cb1d231759 | |||
| 2682593683 | |||
| af92e711d9 | |||
| 10f51530d8 | |||
| 896f284ca7 | |||
| cd82ab0035 | |||
| 59fa4633f0 | |||
| c10ec20bf4 | |||
| d0632d6b76 | |||
| 55d4c5dea3 | |||
| 48218b9633 | |||
| 9ade39b5e6 | |||
| fa0c08a371 | |||
| d81c2c694f | |||
| 551d6aaef2 | |||
| 1af048779e | |||
| 8c3b13bf9f | |||
| 7bf72a1022 | |||
| 05c6830a17 | |||
| a2217efaeb | |||
| fd1e586abd | |||
| 05025eadd6 | |||
| 023b06ce72 | |||
| 1ee1a0a366 | |||
| 4c6b78ff59 | |||
| 6a04c5ada4 | |||
| 0fc3645b0b | |||
| 72954f180e | |||
| d46c043856 | |||
| 8e29e7a376 | |||
| fef0d3ff2c | |||
| 5145a0c7f6 |
@@ -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/dashboard
|
||||||
|
github-server-url: https://git.ktrix.dev
|
||||||
|
|
||||||
|
- name: Install dependencies
|
||||||
|
run: npm ci
|
||||||
|
working-directory: server/modules/dashboard
|
||||||
|
|
||||||
|
- name: Build
|
||||||
|
run: npm run build
|
||||||
|
working-directory: server/modules/dashboard
|
||||||
@@ -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/dashboard
|
||||||
|
github-server-url: https://git.ktrix.dev
|
||||||
|
|
||||||
|
- name: Install dependencies
|
||||||
|
run: npm ci
|
||||||
|
working-directory: server/modules/dashboard
|
||||||
|
|
||||||
|
- name: Run tests
|
||||||
|
run: npm run test:unit
|
||||||
|
working-directory: server/modules/dashboard
|
||||||
@@ -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 }}
|
||||||
+2
-4
@@ -12,12 +12,10 @@ node_modules/
|
|||||||
/static/
|
/static/
|
||||||
|
|
||||||
# Backend development
|
# Backend development
|
||||||
|
/vendor/
|
||||||
/lib/vendor/
|
/lib/vendor/
|
||||||
coverage/
|
coverage/
|
||||||
phpunit.xml.cache
|
*.cache
|
||||||
.phpunit.result.cache
|
|
||||||
.php-cs-fixer.cache
|
|
||||||
.phpstan.cache
|
|
||||||
.phpactor/
|
.phpactor/
|
||||||
|
|
||||||
# Editors
|
# Editors
|
||||||
|
|||||||
Generated
+18
@@ -0,0 +1,18 @@
|
|||||||
|
{
|
||||||
|
"_readme": [
|
||||||
|
"This file locks the dependencies of your project to a known state",
|
||||||
|
"Read more about it at https://getcomposer.org/doc/01-basic-usage.md#installing-dependencies",
|
||||||
|
"This file is @generated automatically"
|
||||||
|
],
|
||||||
|
"content-hash": "475c660425ef552cb502e7a5cd7300c0",
|
||||||
|
"packages": [],
|
||||||
|
"packages-dev": [],
|
||||||
|
"aliases": [],
|
||||||
|
"minimum-stability": "stable",
|
||||||
|
"stability-flags": {},
|
||||||
|
"prefer-stable": false,
|
||||||
|
"prefer-lowest": false,
|
||||||
|
"platform": {},
|
||||||
|
"platform-dev": {},
|
||||||
|
"plugin-api-version": "2.6.0"
|
||||||
|
}
|
||||||
Generated
+2738
-1026
File diff suppressed because it is too large
Load Diff
+19
-11
@@ -11,25 +11,33 @@
|
|||||||
"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",
|
||||||
"lint": "eslint . --ext .vue,.js,.jsx,.cjs,.mjs,.ts,.tsx,.cts,.mts --fix --ignore-path .gitignore"
|
"lint": "eslint . --ext .vue,.js,.jsx,.cjs,.mjs,.ts,.tsx,.cts,.mts --fix --ignore-path .gitignore",
|
||||||
|
"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": {
|
||||||
"@mdi/js": "^7.4.47",
|
"@mdi/js": "^7.4.47",
|
||||||
"echarts": "^6.0.0",
|
"echarts": "^6.0.0",
|
||||||
"pinia": "^2.3.0",
|
"pinia": "^4.0.0",
|
||||||
"vue": "^3.5.13",
|
"vue": "^3.5.13",
|
||||||
"vue-echarts": "^8.0.0",
|
"vue-echarts": "^8.0.0",
|
||||||
"vue-router": "^4.5.0",
|
"vue-router": "^5.0.0",
|
||||||
"vuetify": "^3.7.6"
|
"vuetify": "^4.0.0"
|
||||||
},
|
},
|
||||||
"devDependencies": {
|
"devDependencies": {
|
||||||
"@types/node": "^22.10.2",
|
"@types/node": "^24.0.0",
|
||||||
"@vitejs/plugin-vue": "^5.2.1",
|
"@vitejs/plugin-vue": "^6.0.0",
|
||||||
"@vue/tsconfig": "^0.7.0",
|
"@vue/tsconfig": "^0.9.0",
|
||||||
"sass": "^1.77.1",
|
"sass": "^1.77.1",
|
||||||
"typescript": "^5.7.2",
|
"typescript": "~6.0.0",
|
||||||
"vite": "^6.0.6",
|
"vite": "^8.0.0",
|
||||||
"vite-plugin-vuetify": "2.0.4",
|
"vite-plugin-vuetify": "2.1.3",
|
||||||
"vue-tsc": "^2.2.10"
|
"vue-tsc": "^3.0.0",
|
||||||
|
"@vitest/coverage-v8": "^4.1.6",
|
||||||
|
"@vue/test-utils": "^2.4.10",
|
||||||
|
"jsdom": "^30.0.0",
|
||||||
|
"vitest": "^4.1.6"
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|||||||
+1
-1
@@ -2,7 +2,7 @@ const routes = [
|
|||||||
{
|
{
|
||||||
name: 'home',
|
name: 'home',
|
||||||
path: '/',
|
path: '/',
|
||||||
component: () => import('@/views/Main.vue'),
|
component: () => import('@/pages/Main.vue'),
|
||||||
},
|
},
|
||||||
];
|
];
|
||||||
|
|
||||||
|
|||||||
@@ -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)
|
||||||
|
})
|
||||||
|
})
|
||||||
@@ -0,0 +1,33 @@
|
|||||||
|
import { fileURLToPath } from 'node:url'
|
||||||
|
import { defineConfig, configDefaults } from 'vitest/config'
|
||||||
|
import vue from '@vitejs/plugin-vue'
|
||||||
|
import path from 'path'
|
||||||
|
|
||||||
|
const __filename = fileURLToPath(import.meta.url)
|
||||||
|
const __dirname = path.dirname(__filename)
|
||||||
|
|
||||||
|
export default defineConfig({
|
||||||
|
plugins: [vue()],
|
||||||
|
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/**',
|
||||||
|
],
|
||||||
|
},
|
||||||
|
},
|
||||||
|
})
|
||||||
Reference in New Issue
Block a user