mirror of
https://github.com/shumaiOne/shumai.git
synced 2026-11-23 01:20:04 +00:00
Merge pull request #140 from shumaiOne/ci/smoke-test-local-release
ci(release): add smoke tests to local release stage
This commit is contained in:
@@ -46,3 +46,12 @@ jobs:
|
||||
- name: Test Local Release
|
||||
run: |
|
||||
bun run release:local --skip-check --out /tmp/shumai-local-release --force
|
||||
|
||||
echo "Smoke testing shumai..."
|
||||
bun run /tmp/shumai-local-release/node/node_modules/@shumai-one/shumai/bin/shumai-app.js --check
|
||||
|
||||
echo "Smoke testing shumai-agent..."
|
||||
bun run /tmp/shumai-local-release/node/node_modules/@shumai-one/shumai-agent/bin/shumai-agent-app.js --check
|
||||
|
||||
echo "Smoke testing shumai-transcode..."
|
||||
bun run /tmp/shumai-local-release/node/node_modules/@shumai-one/shumai-transcode/bin/shumai-transcode-app.js --check
|
||||
|
||||
@@ -5,6 +5,11 @@ import { workflowService } from '@shumai/workflow-core'
|
||||
import { TaskQueueAgent } from '@shumai/workflow-core'
|
||||
import { initAgentWorkflows } from '@shumai/agent'
|
||||
|
||||
if (process.argv.includes('--check')) {
|
||||
console.log('✅ Agent worker evaluated successfully!')
|
||||
process.exit(0)
|
||||
}
|
||||
|
||||
async function run() {
|
||||
// Initialize workflows and activities
|
||||
initAgentWorkflows()
|
||||
|
||||
@@ -4,6 +4,11 @@ loadEnvConfig(process.cwd(), process.env.NODE_ENV !== 'production')
|
||||
import { initTranscodeWorkflows } from '@shumai/transcode'
|
||||
import { TaskQueueTranscode, workflowService } from '@shumai/workflow-core'
|
||||
|
||||
if (process.argv.includes('--check')) {
|
||||
console.log('✅ Transcode worker evaluated successfully!')
|
||||
process.exit(0)
|
||||
}
|
||||
|
||||
async function run() {
|
||||
// Initialize workflows and activities
|
||||
initTranscodeWorkflows()
|
||||
|
||||
@@ -11,6 +11,11 @@ import { initTranscodeWorkflows } from '@shumai/transcode'
|
||||
import { workflowService } from '@shumai/workflow-core'
|
||||
import { app } from '@shumai/api'
|
||||
|
||||
if (process.argv.includes('--check')) {
|
||||
console.log('✅ Web app evaluated successfully!')
|
||||
process.exit(0)
|
||||
}
|
||||
|
||||
// Initialize workflows and activities for local executor mode
|
||||
initAgentWorkflows()
|
||||
initTranscodeWorkflows()
|
||||
|
||||
@@ -1,16 +1,16 @@
|
||||
import { client } from '@/ui/api/client'
|
||||
import { Avatar, AvatarFallback, AvatarImage } from '@/ui/components/ui/avatar'
|
||||
import {
|
||||
DropdownMenu,
|
||||
DropdownMenuContent,
|
||||
DropdownMenuItem,
|
||||
DropdownMenuLabel,
|
||||
DropdownMenuPortal,
|
||||
DropdownMenuSeparator,
|
||||
DropdownMenuSub,
|
||||
DropdownMenuSubContent,
|
||||
DropdownMenuSubTrigger,
|
||||
DropdownMenuTrigger,
|
||||
DropdownMenu,
|
||||
DropdownMenuContent,
|
||||
DropdownMenuItem,
|
||||
DropdownMenuLabel,
|
||||
DropdownMenuPortal,
|
||||
DropdownMenuSeparator,
|
||||
DropdownMenuSub,
|
||||
DropdownMenuSubContent,
|
||||
DropdownMenuSubTrigger,
|
||||
DropdownMenuTrigger,
|
||||
} from '@/ui/components/ui/dropdown-menu'
|
||||
import { useTeamId } from '@/ui/hooks/use-team-id'
|
||||
import { signOut } from '@/ui/lib/auth-client'
|
||||
|
||||
+37
-9
@@ -1,5 +1,5 @@
|
||||
import tailwindPlugin from 'bun-plugin-tailwind'
|
||||
import { existsSync } from 'node:fs'
|
||||
import { existsSync, readFileSync, readdirSync } from 'node:fs'
|
||||
import { cp, mkdir, readdir, rm, writeFile } from 'node:fs/promises'
|
||||
import path from 'node:path'
|
||||
import { temporalWorkflow } from '../packages/workflow-core/src/bun-temporal-plugin'
|
||||
@@ -34,20 +34,48 @@ const commonExternal = [
|
||||
'@temporalio/worker',
|
||||
'@temporalio/workflow',
|
||||
'prisma',
|
||||
'zod',
|
||||
]
|
||||
|
||||
// Extract exact dependency versions from workspace
|
||||
// Extract exact dependency versions from workspace package.json files
|
||||
console.log('🔍 Extracting exact dependency versions for runtime packages...')
|
||||
const lsOutput = Bun.spawnSync(['bun', 'pm', 'ls', '--all']).stdout.toString()
|
||||
const dependencyVersions: Record<string, string> = {}
|
||||
|
||||
// Find all workspace package.json files
|
||||
const packageJsonPaths = ['package.json']
|
||||
const workspaceDirs = ['packages', 'apps']
|
||||
for (const dir of workspaceDirs) {
|
||||
if (existsSync(dir)) {
|
||||
const subdirs = readdirSync(dir)
|
||||
for (const subdir of subdirs) {
|
||||
const p = path.join(dir, subdir, 'package.json')
|
||||
if (existsSync(p)) {
|
||||
packageJsonPaths.push(p)
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
for (const dep of commonExternal) {
|
||||
const escapedDep = dep.replace(/[.*+?^${}()|[\]\\]/g, '\\$&')
|
||||
const regex = new RegExp(`(?:^|\\s)${escapedDep}@(\\d+\\.\\d+\\.\\d+[^\\s]*)`, 'g')
|
||||
const match = regex.exec(lsOutput)
|
||||
if (match && match[1]) {
|
||||
dependencyVersions[dep] = match[1]
|
||||
console.log(` ✅ Found ${dep}@${match[1]}`)
|
||||
let foundVersion: string | null = null
|
||||
for (const p of packageJsonPaths) {
|
||||
try {
|
||||
const content = readFileSync(p, 'utf8')
|
||||
const pkgJson = JSON.parse(content)
|
||||
const version = pkgJson.dependencies?.[dep] || pkgJson.devDependencies?.[dep]
|
||||
if (version) {
|
||||
// Strip any leading range specifiers like ^ or ~ to get the base version
|
||||
foundVersion = version.replace(/^[\^~]/, '')
|
||||
break
|
||||
}
|
||||
} catch {
|
||||
// ignore read/parse errors
|
||||
}
|
||||
}
|
||||
|
||||
if (foundVersion) {
|
||||
dependencyVersions[dep] = foundVersion
|
||||
console.log(` ✅ Found ${dep}@${foundVersion}`)
|
||||
} else {
|
||||
console.warn(` ⚠️ Warning: Could not find exact version for ${dep}`)
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user