mirror of
https://github.com/shumaiOne/shumai.git
synced 2026-12-03 14:34:40 +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
|
- name: Test Local Release
|
||||||
run: |
|
run: |
|
||||||
bun run release:local --skip-check --out /tmp/shumai-local-release --force
|
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 { TaskQueueAgent } from '@shumai/workflow-core'
|
||||||
import { initAgentWorkflows } from '@shumai/agent'
|
import { initAgentWorkflows } from '@shumai/agent'
|
||||||
|
|
||||||
|
if (process.argv.includes('--check')) {
|
||||||
|
console.log('✅ Agent worker evaluated successfully!')
|
||||||
|
process.exit(0)
|
||||||
|
}
|
||||||
|
|
||||||
async function run() {
|
async function run() {
|
||||||
// Initialize workflows and activities
|
// Initialize workflows and activities
|
||||||
initAgentWorkflows()
|
initAgentWorkflows()
|
||||||
|
|||||||
@@ -4,6 +4,11 @@ loadEnvConfig(process.cwd(), process.env.NODE_ENV !== 'production')
|
|||||||
import { initTranscodeWorkflows } from '@shumai/transcode'
|
import { initTranscodeWorkflows } from '@shumai/transcode'
|
||||||
import { TaskQueueTranscode, workflowService } from '@shumai/workflow-core'
|
import { TaskQueueTranscode, workflowService } from '@shumai/workflow-core'
|
||||||
|
|
||||||
|
if (process.argv.includes('--check')) {
|
||||||
|
console.log('✅ Transcode worker evaluated successfully!')
|
||||||
|
process.exit(0)
|
||||||
|
}
|
||||||
|
|
||||||
async function run() {
|
async function run() {
|
||||||
// Initialize workflows and activities
|
// Initialize workflows and activities
|
||||||
initTranscodeWorkflows()
|
initTranscodeWorkflows()
|
||||||
|
|||||||
@@ -11,6 +11,11 @@ import { initTranscodeWorkflows } from '@shumai/transcode'
|
|||||||
import { workflowService } from '@shumai/workflow-core'
|
import { workflowService } from '@shumai/workflow-core'
|
||||||
import { app } from '@shumai/api'
|
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
|
// Initialize workflows and activities for local executor mode
|
||||||
initAgentWorkflows()
|
initAgentWorkflows()
|
||||||
initTranscodeWorkflows()
|
initTranscodeWorkflows()
|
||||||
|
|||||||
@@ -1,16 +1,16 @@
|
|||||||
import { client } from '@/ui/api/client'
|
import { client } from '@/ui/api/client'
|
||||||
import { Avatar, AvatarFallback, AvatarImage } from '@/ui/components/ui/avatar'
|
import { Avatar, AvatarFallback, AvatarImage } from '@/ui/components/ui/avatar'
|
||||||
import {
|
import {
|
||||||
DropdownMenu,
|
DropdownMenu,
|
||||||
DropdownMenuContent,
|
DropdownMenuContent,
|
||||||
DropdownMenuItem,
|
DropdownMenuItem,
|
||||||
DropdownMenuLabel,
|
DropdownMenuLabel,
|
||||||
DropdownMenuPortal,
|
DropdownMenuPortal,
|
||||||
DropdownMenuSeparator,
|
DropdownMenuSeparator,
|
||||||
DropdownMenuSub,
|
DropdownMenuSub,
|
||||||
DropdownMenuSubContent,
|
DropdownMenuSubContent,
|
||||||
DropdownMenuSubTrigger,
|
DropdownMenuSubTrigger,
|
||||||
DropdownMenuTrigger,
|
DropdownMenuTrigger,
|
||||||
} from '@/ui/components/ui/dropdown-menu'
|
} from '@/ui/components/ui/dropdown-menu'
|
||||||
import { useTeamId } from '@/ui/hooks/use-team-id'
|
import { useTeamId } from '@/ui/hooks/use-team-id'
|
||||||
import { signOut } from '@/ui/lib/auth-client'
|
import { signOut } from '@/ui/lib/auth-client'
|
||||||
|
|||||||
+37
-9
@@ -1,5 +1,5 @@
|
|||||||
import tailwindPlugin from 'bun-plugin-tailwind'
|
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 { cp, mkdir, readdir, rm, writeFile } from 'node:fs/promises'
|
||||||
import path from 'node:path'
|
import path from 'node:path'
|
||||||
import { temporalWorkflow } from '../packages/workflow-core/src/bun-temporal-plugin'
|
import { temporalWorkflow } from '../packages/workflow-core/src/bun-temporal-plugin'
|
||||||
@@ -34,20 +34,48 @@ const commonExternal = [
|
|||||||
'@temporalio/worker',
|
'@temporalio/worker',
|
||||||
'@temporalio/workflow',
|
'@temporalio/workflow',
|
||||||
'prisma',
|
'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...')
|
console.log('🔍 Extracting exact dependency versions for runtime packages...')
|
||||||
const lsOutput = Bun.spawnSync(['bun', 'pm', 'ls', '--all']).stdout.toString()
|
|
||||||
const dependencyVersions: Record<string, string> = {}
|
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) {
|
for (const dep of commonExternal) {
|
||||||
const escapedDep = dep.replace(/[.*+?^${}()|[\]\\]/g, '\\$&')
|
let foundVersion: string | null = null
|
||||||
const regex = new RegExp(`(?:^|\\s)${escapedDep}@(\\d+\\.\\d+\\.\\d+[^\\s]*)`, 'g')
|
for (const p of packageJsonPaths) {
|
||||||
const match = regex.exec(lsOutput)
|
try {
|
||||||
if (match && match[1]) {
|
const content = readFileSync(p, 'utf8')
|
||||||
dependencyVersions[dep] = match[1]
|
const pkgJson = JSON.parse(content)
|
||||||
console.log(` ✅ Found ${dep}@${match[1]}`)
|
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 {
|
} else {
|
||||||
console.warn(` ⚠️ Warning: Could not find exact version for ${dep}`)
|
console.warn(` ⚠️ Warning: Could not find exact version for ${dep}`)
|
||||||
}
|
}
|
||||||
|
|||||||
Reference in New Issue
Block a user