Skip to content

Commit bdff917

Browse files
committed
feat(scripts): avoid LLM setup when running in CI
1 parent 52cf4af commit bdff917

2 files changed

Lines changed: 8 additions & 1 deletion

File tree

scripts/setup/setup.js

Lines changed: 7 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,4 @@
1+
import { IS_GITHUB_ACTIONS } from '@/constants'
12
import { LoaderHelper } from '@/helpers/loader-helper'
23
import { LogHelper } from '@/helpers/log-helper'
34

@@ -24,7 +25,12 @@ import createInstanceID from './create-instance-id'
2425
await setupCore()
2526
await setupSkills()
2627
LoaderHelper.stop()
27-
await setupLLM()
28+
if (!IS_GITHUB_ACTIONS) {
29+
await setupLLM()
30+
} else {
31+
LogHelper.info('Skipping LLM setup because it is running in CI')
32+
}
33+
2834
await setupBinaries()
2935
await generateHTTPAPIKey()
3036
await generateJSONSchemas()

server/src/constants.ts

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -238,4 +238,5 @@ export const MINIMUM_REQUIRED_RAM = 4
238238
export const INSTANCE_ID = fs.existsSync(LEON_FILE_PATH)
239239
? JSON.parse(fs.readFileSync(LEON_FILE_PATH, 'utf8')).instanceID
240240
: null
241+
export const IS_GITHUB_ACTIONS = process.env['GITHUB_ACTIONS'] !== undefined
241242
export const IS_GITPOD = process.env['GITPOD_WORKSPACE_URL'] !== undefined

0 commit comments

Comments
 (0)