Compare commits
3 Commits
server-sta
...
de76a761a3
| Author | SHA1 | Date | |
|---|---|---|---|
|
|
de76a761a3 | ||
|
|
8759d85f3d | ||
|
|
eecbd07b5c |
@@ -1,45 +0,0 @@
|
|||||||
name: Validation applicative
|
|
||||||
|
|
||||||
on:
|
|
||||||
push:
|
|
||||||
branches: [main, master]
|
|
||||||
paths-ignore:
|
|
||||||
- "**.md"
|
|
||||||
- "docs/**"
|
|
||||||
pull_request:
|
|
||||||
branches: [main, master]
|
|
||||||
paths-ignore:
|
|
||||||
- "**.md"
|
|
||||||
- "docs/**"
|
|
||||||
workflow_dispatch:
|
|
||||||
|
|
||||||
jobs:
|
|
||||||
verify:
|
|
||||||
name: TypeScript, tests et build
|
|
||||||
# Label dédié : image locale avec Node 22, pnpm verrouillé et Bash déjà installés.
|
|
||||||
runs-on: ci-node22
|
|
||||||
timeout-minutes: 15
|
|
||||||
steps:
|
|
||||||
- name: Récupérer les sources
|
|
||||||
uses: actions/checkout@v4
|
|
||||||
|
|
||||||
- name: Calculer la clé de cache pnpm
|
|
||||||
id: pnpm-cache-key
|
|
||||||
shell: bash
|
|
||||||
run: |
|
|
||||||
echo "store=$(pnpm store path --silent)" >> "$GITHUB_OUTPUT"
|
|
||||||
echo "lock=$(sha256sum pnpm-lock.yaml | cut -d ' ' -f 1)" >> "$GITHUB_OUTPUT"
|
|
||||||
|
|
||||||
- name: Restaurer le store pnpm
|
|
||||||
uses: actions/cache@v4
|
|
||||||
with:
|
|
||||||
path: ${{ steps.pnpm-cache-key.outputs.store }}
|
|
||||||
key: pnpm-${{ runner.os }}-${{ steps.pnpm-cache-key.outputs.lock }}
|
|
||||||
restore-keys: |
|
|
||||||
pnpm-${{ runner.os }}-
|
|
||||||
|
|
||||||
- name: Installer les dépendances verrouillées
|
|
||||||
run: pnpm install --frozen-lockfile --prefer-offline
|
|
||||||
|
|
||||||
- name: Vérifier TypeScript, tests et build
|
|
||||||
run: pnpm verify
|
|
||||||
5
app.json
5
app.json
@@ -9,8 +9,5 @@
|
|||||||
"containerName": "demat-facturation-app",
|
"containerName": "demat-facturation-app",
|
||||||
"image": "images/demat-facturation-dsi.jpg",
|
"image": "images/demat-facturation-dsi.jpg",
|
||||||
"giteaRepo": "demat-facturation",
|
"giteaRepo": "demat-facturation",
|
||||||
"giteaOwner": "manus-admin",
|
"giteaOwner": "manus-admin"
|
||||||
"ci": {
|
|
||||||
"required": true
|
|
||||||
}
|
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -10,8 +10,7 @@
|
|||||||
"check": "tsc --noEmit",
|
"check": "tsc --noEmit",
|
||||||
"format": "prettier --write .",
|
"format": "prettier --write .",
|
||||||
"test": "vitest run",
|
"test": "vitest run",
|
||||||
"db:push": "drizzle-kit generate && drizzle-kit migrate",
|
"db:push": "drizzle-kit generate && drizzle-kit migrate"
|
||||||
"verify": "pnpm check && pnpm test && pnpm build"
|
|
||||||
},
|
},
|
||||||
"dependencies": {
|
"dependencies": {
|
||||||
"@aws-sdk/client-s3": "^3.693.0",
|
"@aws-sdk/client-s3": "^3.693.0",
|
||||||
@@ -138,4 +137,4 @@
|
|||||||
"sharp"
|
"sharp"
|
||||||
]
|
]
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
@@ -406,7 +406,4 @@ async function startServer() {
|
|||||||
}, 5000); // Attendre 5s que le serveur soit prêt
|
}, 5000); // Attendre 5s que le serveur soit prêt
|
||||||
}
|
}
|
||||||
|
|
||||||
// Vitest ne doit jamais démarrer un serveur HTTP.
|
startServer().catch(console.error);
|
||||||
if (!process.env.VITEST) {
|
|
||||||
startServer().catch(console.error);
|
|
||||||
}
|
|
||||||
|
|||||||
@@ -1224,8 +1224,6 @@ export async function updateWebImportSourceStatus(
|
|||||||
* Used to prevent duplicate file storage during email import
|
* Used to prevent duplicate file storage during email import
|
||||||
*/
|
*/
|
||||||
export async function findSourceFileByFileName(userId: number, fileName: string): Promise<any | null> {
|
export async function findSourceFileByFileName(userId: number, fileName: string): Promise<any | null> {
|
||||||
const db = await getDb();
|
|
||||||
if (!db) return null;
|
|
||||||
const result = await db.select()
|
const result = await db.select()
|
||||||
.from(sourceFiles)
|
.from(sourceFiles)
|
||||||
.where(and(
|
.where(and(
|
||||||
|
|||||||
@@ -1,13 +1,11 @@
|
|||||||
import { describe, it, expect, beforeAll } from "vitest";
|
import { describe, it, expect, beforeAll } from "vitest";
|
||||||
|
|
||||||
const describeIntegration = process.env.DATABASE_URL ? describe : describe.skip;
|
|
||||||
import {
|
import {
|
||||||
getLlmFieldsConfigByUser,
|
getLlmFieldsConfigByUser,
|
||||||
upsertLlmFieldConfig,
|
upsertLlmFieldConfig,
|
||||||
initializeDefaultLlmFields
|
initializeDefaultLlmFields
|
||||||
} from "./db";
|
} from "./db";
|
||||||
|
|
||||||
describeIntegration("LLM Fields Configuration", () => {
|
describe("LLM Fields Configuration", () => {
|
||||||
const testUserId = 99999; // Use a high ID to avoid conflicts
|
const testUserId = 99999; // Use a high ID to avoid conflicts
|
||||||
|
|
||||||
beforeAll(async () => {
|
beforeAll(async () => {
|
||||||
|
|||||||
Reference in New Issue
Block a user