diff --git a/.github/workflows/ci.yml b/.github/workflows/ci.yml index f36c7477..9c47f5c2 100644 --- a/.github/workflows/ci.yml +++ b/.github/workflows/ci.yml @@ -45,6 +45,11 @@ jobs: working-directory: ./frontend run: npm ci + - name: Install Chrome + uses: browser-actions/setup-chrome@latest + - name: Run tests (frontend) working-directory: ./frontend run: npm run test:ci + env: + CHROME_BIN: /usr/bin/google-chrome-stable diff --git a/frontend/package.json b/frontend/package.json index 8a049cbc..caa7619a 100644 --- a/frontend/package.json +++ b/frontend/package.json @@ -12,6 +12,7 @@ "build": "npm run write:env -s && ng build --base-href=/ui/", "watch": "ng build --watch --configuration development", "test": "ng test", + "test:ci": "ng test --no-watch --no-progress --browsers=ChromeHeadless", "lint": "ng lint", "lint:ci": "echo skipping", "write:env": "ngx-scripts env npm_package_version SERVER_URL GCLOUD_PROJECT FIRESTORE_DATABASE AUTH" diff --git a/src/llm/models/openai.ts b/src/llm/models/openai.ts index 95119f37..474778e6 100644 --- a/src/llm/models/openai.ts +++ b/src/llm/models/openai.ts @@ -167,7 +167,7 @@ export class OpenAI extends BaseLLM { stream: false, }); const responseText = stream.choices[0].message.content; - let timeToFirstToken = Date.now(); + const timeToFirstToken = Date.now(); const finishTime = Date.now(); const llmCall: LlmCall = await llmCallSave;