1
1
mirror of https://github.com/leon-ai/leon.git synced 2024-08-17 06:00:33 +03:00

feat(scripts): avoid LLM setup when running in CI

This commit is contained in:
louistiti 2024-05-08 19:21:52 +08:00
parent 52cf4afbec
commit bdff917e04
No known key found for this signature in database
GPG Key ID: 92CD6A2E497E1669
2 changed files with 8 additions and 1 deletions

View File

@ -1,3 +1,4 @@
import { IS_GITHUB_ACTIONS } from '@/constants'
import { LoaderHelper } from '@/helpers/loader-helper'
import { LogHelper } from '@/helpers/log-helper'
@ -24,7 +25,12 @@ import createInstanceID from './create-instance-id'
await setupCore()
await setupSkills()
LoaderHelper.stop()
await setupLLM()
if (!IS_GITHUB_ACTIONS) {
await setupLLM()
} else {
LogHelper.info('Skipping LLM setup because it is running in CI')
}
await setupBinaries()
await generateHTTPAPIKey()
await generateJSONSchemas()

View File

@ -238,4 +238,5 @@ export const MINIMUM_REQUIRED_RAM = 4
export const INSTANCE_ID = fs.existsSync(LEON_FILE_PATH)
? JSON.parse(fs.readFileSync(LEON_FILE_PATH, 'utf8')).instanceID
: null
export const IS_GITHUB_ACTIONS = process.env['GITHUB_ACTIONS'] !== undefined
export const IS_GITPOD = process.env['GITPOD_WORKSPACE_URL'] !== undefined