Skip to content

ci: add Teams CLI template validation workflow#2911

Merged
heyitsaamir merged 9 commits into
mainfrom
heyitsaamir-ci-templates-workflow
Jul 6, 2026
Merged

ci: add Teams CLI template validation workflow#2911
heyitsaamir merged 9 commits into
mainfrom
heyitsaamir-ci-templates-workflow

Conversation

@heyitsaamir

Copy link
Copy Markdown
Collaborator

Summary

Adds .github/workflows/ci-templates.yml to catch Teams CLI project template regressions in CI. The scaffolding CLI (@microsoft/teams.cli) is built first, then each language/template is scaffolded non-interactively (project new <lang> app --template <tpl> --json) and validated end-to-end.

Templates reference published SDK packages, so only public registries (npm/NuGet/PyPI) are needed.

Jobs (each with a template matrix)

templates-typescript (echo, graph, tab)

  • npm install + npm run build
  • Typecheck — the tsup build does not typecheck, so tsc runs explicitly: tsc --noEmit for echo/graph, tsc -b --force for tab (project references).

templates-csharp (echo)

  • .NET 10 setup + dotnet build.

templates-python (echo, graph)

  • Python 3.12 + uv; uv venv + uv pip install -e . + pyright typecheck.

Smoke boot

For the echo template across all three languages: starts the server, polls until port 3978 binds (~30–40s), then always kills the listener via a trap cleanup. Booting without credentials is fine — the app warns about missing auth but still binds.

Triggers

pull_request to main on paths: packages/cli/templates/**, packages/cli/**, .github/workflows/ci-templates.yml.

Validation

Every job's scaffold → build → typecheck → boot path was reproduced locally and passes. YAML syntax validated.

heyitsaamir and others added 8 commits July 6, 2026 10:31
…t docs

- csharp/echo: fix CS1503 — Typing(cancellationToken) bound the token to the
  string? text param; use named arg Typing(cancellationToken: cancellationToken)
- typescript/echo,graph,tab: add skipLibCheck so the SDK's own express-importing
  .d.ts files don't surface errors in editors/tsc
- typescript/tab: add @types/react + @types/react-dom (were missing) and scope
  tsconfig.node.json to src/index.ts so it stops type-checking the React client
- docs(csharp quickstart): correct QuoteAgent naming (was Quote.Agent) and bump
  prerequisite to .NET 10 to match the template's net10.0 target
- docs(typescript quickstart): replace stale nodemon/ts-node console output with
  the actual tsx dev output
- docs(python quickstart): add the missing venv + pip install -e . step so
  'python src/main.py' doesn't fail with ModuleNotFoundError

Verified: all six templates (cs echo; ts echo/graph/tab; py echo/graph) build /
type-check cleanly from a fresh scaffold. CLI test suite passes (206).

Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com>
The CLI no longer scaffolds a manifest.json/appPackage into new projects —
the manifest + icons are generated on demand by the CLI (app create builds
the package zip in-memory and imports it to TDP). Remove the outdated
'project new creates your manifest files' claims from the getting-started
quickstart + code-basics docs and the user-authentication guides, and drop
the appPackage/ entries from the project-structure trees. Also fix the C#
code-basics tree to use QuoteAgent/ (was Quote.Agent/).

Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com>
The default App rejects unauthenticated requests, which is why the M365
Agents Playground fails against a freshly scaffolded agent. Document
enabling skipAuth for local dev in all three quickstarts:
- TypeScript: new App({ skipAuth: true })
- Python: App(skip_auth=True)
- C#: builder.AddTeams(skipAuth: true)

Verified each option exists in its SDK and that the C# form compiles.
Note: despite a misleading 'will accept unauthenticated requests' warning,
C#'s authorization policy also rejects all requests without credentials
unless skipAuth is set — same effective behavior as TS/Python. Each note
warns against using skipAuth in production.

Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com>
Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com>
Add .github/workflows/ci-templates.yml to catch Teams CLI project
template regressions. Builds the scaffolding CLI, then for each
language/template scaffolds non-interactively and validates it builds,
typechecks, and (for echo) boots and binds port 3978.

- typescript (echo, graph, tab): npm build + tsc typecheck (tsc -b for tab)
- csharp (echo): dotnet build
- python (echo, graph): uv editable install + pyright
- smoke-boot for echo templates across all three languages

Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com>
Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com>
Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com>
Reverts the workflow_dispatch and branch-push triggers that were added
only to validate the workflow on real GitHub Actions runners.

Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com>
Base automatically changed from heyitsaamir-crispy-pancake to main July 6, 2026 22:51
…tes-workflow

# Conflicts:
#	teams.md/src/components/include/getting-started/code-basics/csharp.incl.md
#	teams.md/src/components/include/getting-started/quickstart/csharp.incl.md
#	teams.md/src/components/include/getting-started/quickstart/python.incl.md
#	teams.md/src/components/include/getting-started/quickstart/typescript.incl.md
Copilot AI review requested due to automatic review settings July 6, 2026 22:52
@heyitsaamir heyitsaamir merged commit 5d47c8a into main Jul 6, 2026
8 checks passed
@heyitsaamir heyitsaamir deleted the heyitsaamir-ci-templates-workflow branch July 6, 2026 22:55

Copilot AI left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Pull request overview

Adds a new GitHub Actions workflow to validate Teams CLI project templates end-to-end in PR CI, to catch regressions in scaffolding + build/typecheck + (echo) boot behavior across supported languages.

Changes:

  • Introduces .github/workflows/ci-templates.yml triggered on PRs to main when CLI/templates/workflow files change.
  • Builds @microsoft/teams.cli, scaffolds template projects in a matrix (TS: echo/graph/tab; C#: echo; Python: echo/graph), then validates build/typecheck.
  • Adds “echo” smoke-boot checks (port 3978 polling) per language.

Comment thread .github/workflows/ci-templates.yml
Comment thread .github/workflows/ci-templates.yml
Comment thread .github/workflows/ci-templates.yml
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants