chore: update tooling, CI workflows, and dependencies

Update CI/release workflows, gitignore, package dependencies,
Tauri config, and add linter/formatter configs (oxlint, prettier,
knip, vitest browser config).
This commit is contained in:
jevb
2026-04-01 11:40:55 +02:00
parent 867041b094
commit 87ba387623
12 changed files with 1952 additions and 5 deletions
+40 -2
View File
@@ -24,12 +24,16 @@ jobs:
- uses: actions/setup-go@v5
with:
go-version: "1.25"
cache-dependency-path: Server/go.sum
- name: Build server
run: go build -o chatserver.exe -ldflags "-s -w" .
- name: Run tests with coverage
run: go test ./... -coverprofile=coverage.out -cover
- name: Go vulnerability check
run: go install golang.org/x/vuln/cmd/govulncheck@latest && govulncheck ./...
- name: Run tests with race detection and coverage
run: go test -race ./... -coverprofile=coverage.out -cover
- name: Upload Go coverage
if: always()
@@ -63,9 +67,24 @@ jobs:
- name: Install npm dependencies
run: npm ci
- name: Security audit (npm)
run: npm audit --audit-level=high
- name: Oxlint (fast correctness checks)
run: npx oxlint src/
- name: TypeScript check
run: npx tsc --noEmit
- name: ESLint (type-aware rules)
run: npx eslint src/
- name: Prettier format check
run: npx prettier --check "src/**/*.ts" "tests/**/*.ts"
- name: Knip (unused code & deps)
run: npx knip || true
- name: Run unit tests with coverage
run: npx vitest run --coverage --reporter=default
@@ -97,6 +116,8 @@ jobs:
- name: Install Rust
uses: dtolnay/rust-toolchain@stable
with:
components: clippy
- name: Rust cache
uses: swatinem/rust-cache@v2
@@ -106,6 +127,23 @@ jobs:
- name: Install npm dependencies
run: npm ci
- name: Install tauri-typegen
run: cargo install tauri-typegen --quiet
- name: Generate TypeScript IPC bindings
working-directory: Client/tauri-client/
run: cargo tauri-typegen generate
- name: Clippy lint (Rust)
working-directory: Client/tauri-client/src-tauri/
run: cargo clippy -- -D warnings
- name: Security audit (Rust dependencies)
working-directory: Client/tauri-client/src-tauri/
run: |
cargo install cargo-audit --quiet
cargo audit
- name: Build Tauri app
env:
TAURI_SIGNING_PRIVATE_KEY: ${{ secrets.TAURI_SIGNING_PRIVATE_KEY }}
+8 -1
View File
@@ -85,6 +85,13 @@ jobs:
}
$lines -join "`n" | Out-File -FilePath checksums.sha256 -Encoding utf8 -NoNewline
- name: Install root dependencies (changelogen)
run: npm ci
- name: Generate changelog
shell: bash
run: npx changelogen --output CHANGELOG.md
- name: Create GitHub Release
env:
GH_TOKEN: ${{ secrets.GITHUB_TOKEN }}
@@ -103,5 +110,5 @@ jobs:
ASSETS+=("${{ steps.artifacts.outputs.nsis_sig }}")
fi
gh release create ${{ github.ref_name }} \
--generate-notes \
--notes-file CHANGELOG.md \
"${ASSETS[@]}"
+4
View File
@@ -43,6 +43,10 @@ Client/publish-release/
Client/login-mockup.html
Client/ui-mockup.html
# Tauri typegen (auto-generated IPC bindings)
Client/tauri-client/src/generated/
.typecache
# Node modules
node_modules/
+9
View File
@@ -0,0 +1,9 @@
{
"$schema": "https://raw.githubusercontent.com/oxc-project/oxc/main/npm/oxlint/configuration_schema.json",
"categories": {
"correctness": "error",
"suspicious": "warn",
"perf": "warn"
},
"ignorePatterns": ["dist", "node_modules", "public"]
}
+6
View File
@@ -0,0 +1,6 @@
dist/
src-tauri/
node_modules/
public/
coverage/
*.html
+13
View File
@@ -0,0 +1,13 @@
{
"$schema": "https://unpkg.com/knip@6/schema.json",
"entry": ["src/main.ts"],
"project": ["src/**/*.ts"],
"ignore": [
"public/**",
"src-tauri/**"
],
"ignoreDependencies": [
"@tauri-apps/cli"
],
"ignoreExportsUsedInFile": true
}
File diff suppressed because it is too large Load Diff
+20 -2
View File
@@ -17,23 +17,41 @@
"test:e2e:ui": "playwright test --ui",
"test:watch": "vitest",
"test:coverage": "vitest run --coverage",
"test:browser": "vitest run --config vitest.config.browser.ts",
"typecheck": "tsc --noEmit",
"typecheck:build": "tsc -p tsconfig.build.json --noEmit",
"lint": "eslint src/",
"lint:fix": "eslint src/ --fix"
"lint": "oxlint src/ && eslint src/",
"lint:fix": "eslint src/ --fix",
"lint:ox": "oxlint src/",
"format": "prettier --write \"src/**/*.ts\" \"tests/**/*.ts\"",
"format:check": "prettier --check \"src/**/*.ts\" \"tests/**/*.ts\"",
"knip": "knip"
},
"devDependencies": {
"@eslint/js": "^9.39.4",
"@playwright/test": "^1",
"@tauri-apps/cli": "^2",
"@vitest/browser": "^3.2.4",
"@vitest/coverage-v8": "^3",
"eslint": "^9.39.4",
"jsdom": "^29.0.0",
"knip": "^6.1.1",
"oxlint": "^1.58.0",
"prettier": "^3.8.1",
"typescript": "^5.7",
"typescript-eslint": "^8.58.0",
"vite": "^6",
"vitest": "^3"
},
"prettier": {
"singleQuote": false,
"semi": true,
"trailingComma": "all",
"printWidth": 100,
"tabWidth": 2,
"arrowParens": "always",
"endOfLine": "crlf"
},
"dependencies": {
"@jitsi/rnnoise-wasm": "^0.2.1",
"@tauri-apps/api": "^2.10.1",
+1
View File
@@ -10,6 +10,7 @@ crate-type = ["lib", "cdylib", "staticlib"]
[build-dependencies]
tauri-build = { version = "2", features = [] }
tauri-typegen = "0.5"
[features]
default = ["devtools"]
+4
View File
@@ -1,3 +1,7 @@
fn main() {
// Generate TypeScript bindings from #[tauri::command] functions
tauri_typegen::BuildSystem::generate_at_build_time()
.expect("Failed to generate TypeScript bindings");
tauri_build::build()
}
@@ -46,6 +46,12 @@
}
},
"plugins": {
"tauri-typegen": {
"project_path": ".",
"output_path": "../src/generated",
"validation_library": "none",
"verbose": false
},
"updater": {
"pubkey": "dW50cnVzdGVkIGNvbW1lbnQ6IG1pbmlzaWduIHB1YmxpYyBrZXk6IEJCQkQ0NzM1MjkxRTlGQTIKUldTaW54NHBOVWU5dTRqYW0yalI5VTJBd0NXOUZwM2UrcDM4YkhCSmlMZWJKWWVXaGJWdHBaSHgK",
"endpoints": [],
@@ -0,0 +1,26 @@
import { defineConfig } from "vitest/config";
import { resolve } from "path";
export default defineConfig({
resolve: {
alias: {
"@lib": resolve(__dirname, "src/lib"),
"@stores": resolve(__dirname, "src/stores"),
"@components": resolve(__dirname, "src/components"),
"@pages": resolve(__dirname, "src/pages"),
"@styles": resolve(__dirname, "src/styles"),
},
},
test: {
browser: {
enabled: true,
provider: "playwright",
instances: [{ browser: "chromium" }],
},
include: ["tests/browser/**/*.test.ts"],
coverage: {
provider: "v8",
include: ["src/**/*.ts"],
},
},
});