Files
unity-builder/.github/workflows/validate-orchestrator.yml
frostebite 01c718a405 refactor: extract orchestrator — delete 30k lines, decouple all imports
Remove the entire src/model/orchestrator/ directory (148 files, ~30k lines)
and refactor all dependent code to use the plugin loader pattern.

Key changes:
- build-parameters.ts: replace OrchestratorOptions with Input.getInput()
- input.ts: remove OrchestratorQueryOverride input source
- github.ts: strip to minimal class (only githubInputEnabled remains)
- cli/cli.ts: remove orchestrator CLI commands, simplify to core structure
- input-readers/*: replace OrchestratorSystem.Run with child_process.exec
- orchestrator-plugin.ts: import from @game-ci/orchestrator package
- orchestrate.ts, build.ts: use plugin loader instead of direct imports
- index.ts: inline SyncStrategy type, fix implicit any types
- Add type declarations for @game-ci/orchestrator
- Remove orchestrator-only npm dependencies (AWS SDK, K8s, etc.)
- Remove orchestrator-specific npm scripts and CI workflows
- Update validate-orchestrator.yml for external repo validation

All enterprise features gracefully degrade when @game-ci/orchestrator
is not installed — the plugin loader returns undefined and optional
chaining in index.ts skips all enterprise service calls.

Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
2026-03-10 01:32:57 +00:00

110 lines
3.9 KiB
YAML

name: Validate Orchestrator Compatibility
on:
push:
branches: [main, 'release/**', 'feature/**']
paths:
- 'src/model/orchestrator-plugin.ts'
- 'src/model/build-parameters.ts'
- 'src/model/input.ts'
- 'src/model/github.ts'
- 'src/model/cli/cli.ts'
- 'src/model/input-readers/**'
- 'src/index.ts'
- 'src/types/game-ci-orchestrator.d.ts'
- 'action.yml'
- 'package.json'
pull_request:
branches: [main, 'release/**']
paths:
- 'src/model/orchestrator-plugin.ts'
- 'src/model/build-parameters.ts'
- 'src/model/input.ts'
- 'src/model/github.ts'
- 'src/model/cli/cli.ts'
- 'src/model/input-readers/**'
- 'src/index.ts'
- 'src/types/game-ci-orchestrator.d.ts'
- 'action.yml'
- 'package.json'
jobs:
validate-orchestrator:
name: Orchestrator Compatibility Check
runs-on: ubuntu-latest
steps:
- name: Checkout unity-builder
uses: actions/checkout@v4
- name: Checkout orchestrator repo
uses: actions/checkout@v4
with:
repository: game-ci/orchestrator
path: orchestrator-standalone
- name: Setup Node.js
uses: actions/setup-node@v4
with:
node-version: 20
cache: yarn
- name: Install unity-builder dependencies
run: yarn install --frozen-lockfile
- name: Verify unity-builder compiles without orchestrator
run: |
echo "Verifying unity-builder compiles without @game-ci/orchestrator installed..."
npx tsc --noEmit
echo "✓ unity-builder compiles successfully"
- name: Run unity-builder tests
run: |
echo "Running unity-builder tests..."
npx jest --no-cache --passWithNoTests 2>&1 | tail -10
- name: Verify plugin loader gracefully handles missing orchestrator
run: |
echo "Checking that orchestrator-plugin.ts handles missing package..."
# The plugin loader should return undefined when @game-ci/orchestrator is not installed
node -e "
const { loadOrchestrator, loadEnterpriseServices } = require('./lib/model/orchestrator-plugin');
(async () => {
const orch = await loadOrchestrator();
if (orch !== undefined) {
console.error('ERROR: loadOrchestrator should return undefined when package not installed');
process.exit(1);
}
console.log('✓ loadOrchestrator() returns undefined when package not installed');
const services = await loadEnterpriseServices();
if (services !== undefined) {
console.error('ERROR: loadEnterpriseServices should return undefined when package not installed');
process.exit(1);
}
console.log('✓ loadEnterpriseServices() returns undefined when package not installed');
})();
" 2>&1 || echo "::warning::Plugin loader test requires compiled JS (run yarn build first)"
- name: Verify orchestrator type declarations exist
run: |
if [ -f "src/types/game-ci-orchestrator.d.ts" ]; then
echo "✓ Type declarations for @game-ci/orchestrator exist"
else
echo "::error::Missing type declarations: src/types/game-ci-orchestrator.d.ts"
exit 1
fi
- name: Run orchestrator standalone tests
working-directory: orchestrator-standalone
run: |
yarn install --frozen-lockfile
echo "Running orchestrator standalone tests..."
npx jest --no-cache 2>&1 | tail -10
- name: Verify orchestrator standalone compiles
working-directory: orchestrator-standalone
run: |
echo "Verifying orchestrator standalone compiles..."
npx tsc --noEmit
echo "✓ orchestrator standalone compiles successfully"