diff --git a/.github/workflows/lit_samples_build.yml b/.github/workflows/lit_samples_build.yml index 4dc55bd23..8a18b5df9 100644 --- a/.github/workflows/lit_samples_build.yml +++ b/.github/workflows/lit_samples_build.yml @@ -43,8 +43,16 @@ jobs: working-directory: ./samples/client/lit run: npm install --workspaces + - name: Typecheck all lit samples workspaces + working-directory: ./samples/client/lit + run: npm run build:tsc --workspaces + - name: Build all lit samples workspaces working-directory: ./samples/client/lit run: npm run build --workspaces + - name: Test all lit samples workspaces + working-directory: ./samples/client/lit + run: npm run test --workspaces --if-present + diff --git a/.github/workflows/ng_build_and_test.yml b/.github/workflows/ng_build_and_test.yml index e0fb336e0..be22fe683 100644 --- a/.github/workflows/ng_build_and_test.yml +++ b/.github/workflows/ng_build_and_test.yml @@ -43,18 +43,14 @@ jobs: working-directory: ./samples/client/angular run: npm run build:renderer - - name: Build contact sample + - name: Build all Angular projects working-directory: ./samples/client/angular - run: npm run build contact + run: | + for project in gallery contact restaurant rizzcharts orchestrator; do + echo "Building $project..." + npm run build $project + done - - name: Build restaurant sample + - name: Run Angular tests working-directory: ./samples/client/angular - run: npm run build restaurant - - - name: Build Rizzchart sample - working-directory: ./samples/client/angular - run: npm run build rizzcharts - - - name: Build Orchestrator - working-directory: ./samples/client/angular - run: npm run build orchestrator + run: npm run test -- --watch=false --browsers=ChromeHeadless diff --git a/.github/workflows/python_samples_build.yml b/.github/workflows/python_samples_build.yml index 6435adc28..cc90f3911 100644 --- a/.github/workflows/python_samples_build.yml +++ b/.github/workflows/python_samples_build.yml @@ -20,11 +20,13 @@ on: - main paths: - 'samples/agent/adk/**' + - 'samples/agent/mcp/**' - 'agent_sdks/python/**' - 'specification/**/json/**' pull_request: paths: - 'samples/agent/adk/**' + - 'samples/agent/mcp/**' - 'agent_sdks/python/**' - 'specification/**/json/**' @@ -53,16 +55,34 @@ jobs: - name: Build contact_lookup working-directory: samples/agent/adk/contact_lookup - run: uv build . + run: | + uv build . + uv run . --help + uv run python -c "from agent import ContactAgent; a = ContactAgent(base_url='http://localhost', use_ui=True); print(f'Agent card validated: {a.get_agent_card().name}')" - name: Build orchestrator working-directory: samples/agent/adk/orchestrator - run: uv build . + run: | + uv build . + uv run . --help + uv run python -c "from agent import OrchestratorAgent; a = OrchestratorAgent(base_url='http://localhost', use_ui=True); print(f'Agent card validated: {a.get_agent_card().name}')" - name: Build restaurant_finder working-directory: samples/agent/adk/restaurant_finder - run: uv build . + run: | + uv build . + uv run . --help + uv run python -c "from agent import RestaurantAgent; a = RestaurantAgent(base_url='http://localhost', use_ui=True); print(f'Agent card validated: {a.get_agent_card().name}')" - name: Build rizzcharts working-directory: samples/agent/adk/rizzcharts - run: uv build . + run: | + uv build . + uv run . --help + uv run python -c "from agent import RizzchartsAgent; a = RizzchartsAgent(base_url='http://localhost', use_ui=True); print(f'Agent card validated: {a.get_agent_card().name}')" + + - name: Build mcp demo + working-directory: samples/agent/mcp + run: | + uv build . + uv run . --help diff --git a/samples/client/angular/projects/gallery/tsconfig.spec.json b/samples/client/angular/projects/gallery/tsconfig.spec.json new file mode 100644 index 000000000..39f6a19e3 --- /dev/null +++ b/samples/client/angular/projects/gallery/tsconfig.spec.json @@ -0,0 +1,12 @@ +{ + "extends": "../../tsconfig.json", + "compilerOptions": { + "outDir": "../../out-tsc/spec", + "types": [ + "jasmine" + ] + }, + "include": [ + "src/**/*.ts" + ] +} diff --git a/samples/client/lit/component_gallery/package.json b/samples/client/lit/component_gallery/package.json index db7b663c7..92626d691 100644 --- a/samples/client/lit/component_gallery/package.json +++ b/samples/client/lit/component_gallery/package.json @@ -23,7 +23,7 @@ "service": true }, "test": { - "command": "node --test --enable-source-maps --test-reporter spec dist/src/0.8/tests/**/*.test.js", + "command": "npx tsx --test --test-reporter spec tests/**/*.test.ts", "dependencies": [ "build" ] @@ -62,6 +62,7 @@ "devDependencies": { "dotenv": "^17.2.3", "typescript": "^5.8.3", + "tsx": "^4.19.0", "uuid": "^13.0.0", "vite": "^7.1.11", "wireit": "^0.15.0-pre.2" diff --git a/samples/client/lit/component_gallery/tests/smoke.test.ts b/samples/client/lit/component_gallery/tests/smoke.test.ts new file mode 100644 index 000000000..3b654a87f --- /dev/null +++ b/samples/client/lit/component_gallery/tests/smoke.test.ts @@ -0,0 +1,8 @@ +import { test } from 'node:test'; +import assert from 'node:assert'; +import '../component-gallery.ts'; +import '../client.ts'; + +test('smoke test: component_gallery imports resolve', () => { + assert.ok(true); +}); diff --git a/samples/client/lit/contact/package.json b/samples/client/lit/contact/package.json index 58da6a441..4c040f9e9 100644 --- a/samples/client/lit/contact/package.json +++ b/samples/client/lit/contact/package.json @@ -23,7 +23,7 @@ "service": true }, "test": { - "command": "node --test --enable-source-maps --test-reporter spec dist/src/0.8/tests/**/*.test.js", + "command": "npx tsx --test --test-reporter spec tests/**/*.test.ts", "dependencies": [ "build" ] @@ -70,6 +70,7 @@ "devDependencies": { "dotenv": "^17.2.3", "typescript": "^5.8.3", + "tsx": "^4.19.0", "uuid": "^13.0.0", "vite": "^7.1.11", "wireit": "^0.15.0-pre.2" diff --git a/samples/client/lit/contact/tests/smoke.test.ts b/samples/client/lit/contact/tests/smoke.test.ts new file mode 100644 index 000000000..7174daeb6 --- /dev/null +++ b/samples/client/lit/contact/tests/smoke.test.ts @@ -0,0 +1,8 @@ +import { test } from 'node:test'; +import assert from 'node:assert'; +import '../contact.ts'; +import '../client.ts'; + +test('smoke test: contact imports resolve', () => { + assert.ok(true); +}); diff --git a/samples/client/lit/package.json b/samples/client/lit/package.json index 90f6cc2e6..8cad85f40 100644 --- a/samples/client/lit/package.json +++ b/samples/client/lit/package.json @@ -4,6 +4,7 @@ "version": "0.8.1", "description": "A2UI Lit Samples", "workspaces": [ + "component_gallery", "contact", "shell" ], diff --git a/samples/client/lit/shell/package.json b/samples/client/lit/shell/package.json index a8f3b197d..753a452f0 100644 --- a/samples/client/lit/shell/package.json +++ b/samples/client/lit/shell/package.json @@ -25,7 +25,7 @@ "service": true }, "test": { - "command": "node --test --enable-source-maps --test-reporter spec dist/src/0.8/tests/**/*.test.js", + "command": "npx tsx --test --test-reporter spec tests/**/*.test.ts", "dependencies": [ "build" ] @@ -72,6 +72,7 @@ "devDependencies": { "dotenv": "^17.2.3", "typescript": "^5.8.3", + "tsx": "^4.19.0", "uuid": "^13.0.0", "vite": "^7.1.11", "wireit": "^0.15.0-pre.2" diff --git a/samples/client/lit/shell/tests/smoke.test.ts b/samples/client/lit/shell/tests/smoke.test.ts new file mode 100644 index 000000000..55f6e3d16 --- /dev/null +++ b/samples/client/lit/shell/tests/smoke.test.ts @@ -0,0 +1,8 @@ +import { test } from 'node:test'; +import assert from 'node:assert'; +import '../app.ts'; +import '../client.ts'; + +test('smoke test: shell imports resolve', () => { + assert.ok(true); +});