Skip to content

ci: update TypeScript Node LTS matrix and add end-to-end sample verification - #9311

Merged
Vincent Biret (baywet) merged 10 commits into
microsoft:mainfrom
hardikkaurani:fix/ci-node-lts-matrix-and-e2e-verification
Nov 10, 2026
Merged

Vincent Biret (baywet) merged 10 commits into
microsoft:mainfrom
hardikkaurani:fix/ci-node-lts-matrix-and-e2e-verification

Conversation

@hardikkaurani

Copy link
Copy Markdown
Contributor

Description

This pull request resolves a matrix incompatibility in the TypeScript Get Started CI workflow, adds end-to-end sample execution testing for both TypeScript and Go quickstart samples, and fixes missing workflow path triggers for Go.

Root Cause & Motivation

  1. Node.js LTS Matrix Alignment:

    • Both get-started/quickstart/typescript/package.json and get-started/azure-auth/typescript/package.json specify "engines": { "node": ">=20" } and use @types/node v26 along with TypeScript 5.x/6.x in NodeNext module resolution.
    • However, .github/workflows/get-started-typescript.yml was still testing against node-version: [ 16.x, 18.x ], which are both past End-of-Life and trigger engine compatibility warnings (EBADENGINE).
    • The matrix is updated to test against active LTS releases: Node.js 20.x and 22.x.
  2. TypeScript Runtime & Import Verification:

    • Similar to Python (python main.py) and PHP (php main.php), the TypeScript quickstart workflow now includes an end-to-end execution step (node out/index.js), and build-azure verifies client module importability (node --input-type=module -e 'import "./out/client/getUserApiClient.js";').
    • Additionally, the "test" script in get-started/quickstart/typescript/package.json has been updated from a stub error to node out/index.js, making npm test execute the sample successfully.
  3. Go Workflow Path Triggers & End-to-End Verification:

    • .github/workflows/get-started.go.yml omitted '.github/workflows/**' in its push and pull_request path filters, causing workflow edits not to trigger CI (unlike all other language sample workflows in the repo).
    • Added an end-to-end execution step (go run main.go) to build-quickstart in get-started.go.yml.

Changes Summary

  • .github/workflows/get-started-typescript.yml:
    • Update build-azure matrix from [ 16.x, 18.x ] to [ 20.x, 22.x ].
    • Update build-quickstart matrix from [ 16.x, 18.x ] to [ 20.x, 22.x ].
    • Add client import verification step to build-azure.
    • Add end-to-end execution step (node out/index.js) to build-quickstart.
  • .github/workflows/get-started.go.yml:
    • Add '.github/workflows/**' to path triggers.
    • Add go run main.go execution step to build-quickstart.
  • get-started/quickstart/typescript/package.json:
    • Update "test" script to node out/index.js.

Verification

  • Local TypeScript build and tests:
    • npm ci and npm run build executed with 0 vulnerabilities.
    • npm test successfully executed node out/index.js against the mock API (verified posts fetched, created, and updated).
    • Client module import verified in azure-auth/typescript.
  • Local Go build and tests:
    • go build -v ./... passed in both get-started/quickstart/go and get-started/azure-auth/go.
    • go run main.go in get-started/quickstart/go successfully executed all CRUD operations.
  • Git diff inspected: 0 whitespace issues, exactly 7 clean and focused commits.

@hardikkaurani
Hardik K (hardikkaurani) requested a review from a team as a code owner November 5, 2026 10:54
Copilot AI balanced review requested due to automatic review settings November 5, 2026 10:54

Copilot AI left a comment

Copy link
Copy Markdown

Choose a reason for hiding this comment

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

Copilot was unable to review this pull request because the user who requested the review has insufficient remaining quota. Try requesting a review at a lower effort level.

@hardikkaurani

Copy link
Copy Markdown
Contributor Author

Hi Vincent Biret (@baywet),

Opening this pull request to resolve a few small maintenance items across the TypeScript and Go Get Started samples:

  1. Node.js LTS Matrix Incompatibility:
    get-started/quickstart/typescript/package.json and get-started/azure-auth/typescript/package.json declare "engines": { "node": ">=20" }, but .github/workflows/get-started-typescript.yml was still testing against EOL Node 16.x and 18.x. This PR updates the matrix to active LTS versions 20.x and 22.x.

  2. Runtime Verification:
    Similar to the Python and PHP workflows, this PR adds an end-to-end execution check (node out/index.js / npm test for TypeScript, and go run main.go for Go) to validate that the generated client actually executes and performs sample API operations.

  3. Workflow Triggers:
    Added '.github/workflows/**' to path triggers in get-started.go.yml for parity with the other sample workflows.

All builds and sample executions have been validated locally. Thank you!

Copilot AI left a comment

Copy link
Copy Markdown

Choose a reason for hiding this comment

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

🟡 Changes recommended

Quickstart API failures are caught and only logged, leaving a zero exit status that lets the CI step and new npm test command report success despite failed requests.

1 open issue

Review effort: Balanced

@hardikkaurani

Hardik K (hardikkaurani) commented Nov 5, 2026 •

Copy link
Copy Markdown
Contributor Author

Hi Vincent Biret (@baywet),

I've updated get-started/quickstart/typescript/index.ts to set process.exitCode = 1 in the catch (err) handler and configured types: [node] in tsconfig.json.

This ensures that API client failures during sample execution terminate with a non-zero exit code, correctly failing the CI step and npm test runs.

The review discussion thread has also been marked as resolved.

Thank you!

Copilot AI left a comment

Copy link
Copy Markdown

Choose a reason for hiding this comment

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

🔵 Needs a closer look

The TypeScript workflow still tests Node 20 despite locked Azure dependencies requiring Node 22+, causing EBADENGINE warnings and testing an unsupported runtime.

No open issues 🎉

1 previously missed issue

In code that hasn't changed since last review

Medium severity Use Node 22+ for the Azure sample CI job

.github/​workflows/​get-started-typescript.yml:31

The Azure sample's locked dependencies require Node 22 or newer: @azure/identity 4.14.1 declares "node": ">=22.0.0" in get-started/azure-auth/typescript/package-lock.json:138–139, as do several Azure core packages. Keeping 20.x in this matrix therefore still produces EBADENGINE warnings during npm ci and tests an unsupported runtime. Please use Node 22+ for this job, for example 22.x and 24.x.

1 resolved since last review

Review effort: Balanced

@hardikkaurani

Hardik K (hardikkaurani) commented Nov 6, 2026 •

Copy link
Copy Markdown
Contributor Author

Hi Vincent Biret (@baywet),

I've pushed an update to address the engine warning in the TypeScript Azure auth sample:

  • Updated build-azure in .github/workflows/get-started-typescript.yml to test against Node.js 22.x and 24.x.
  • Updated the engines field in get-started/azure-auth/typescript/package.json (and the lockfile) to >=22, matching the requirements of @azure/[email protected] and eliminating EBADENGINE warnings during npm ci.
  • Kept the quickstart matrix on Node.js 20.x and 22.x, since it does not depend on Azure Identity packages and continues to support Node.js 20.

I've verified the clean install, build, and client module import tests locally. Whenever you have a chance, could you please trigger or approve the CI workflow run?

Thanks!

Copilot AI left a comment

Copy link
Copy Markdown

Choose a reason for hiding this comment

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

🟢 Approval recommended

No active review issues remain for the Node.js compatibility and sample-execution CI updates.

No open issues 🎉

1 file not reviewed
  • get-started/azure-auth/typescript/package-lock.json: Generated file

Review effort: Balanced

@hardikkaurani

Copy link
Copy Markdown
Contributor Author

Thank you for the review Vincent Biret (@baywet)

@baywet
Vincent Biret (baywet) merged commit 2d6b0f4 into microsoft:main Nov 10, 2026
31 checks passed
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