Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
1 change: 1 addition & 0 deletions .github/workflows/ci.js.yml
Original file line number Diff line number Diff line change
Expand Up @@ -40,3 +40,4 @@ jobs:
cache-dependency-path: "typescript/package-lock.json"
- run: npm ci
- run: npm run build-all
- run: npm test
21 changes: 21 additions & 0 deletions tools/tests/node-ci.test.mjs
Original file line number Diff line number Diff line change
@@ -0,0 +1,21 @@
// Copyright (c) Microsoft Corporation.
// Licensed under the MIT License.

import assert from "node:assert/strict";
import fs from "node:fs";
import test from "node:test";
import { parse } from "yaml";

const workflow = parse(fs.readFileSync(new URL("../../.github/workflows/ci.js.yml", import.meta.url), "utf8"));

test("Node CI runs the full TypeScript test suite in its build matrix", () => {
assert.equal(workflow.defaults.run["working-directory"], "typescript");
const build = workflow.jobs.build;
const runSteps = build.steps.filter(step => Object.hasOwn(step, "run"));
assert.deepEqual(runSteps.map(step => step.run), ["npm ci", "npm run build-all", "npm test"]);
assert.equal(build["continue-on-error"] ?? false, false);
const testStep = runSteps.at(-1);
assert.equal(testStep.if, undefined);
assert.equal(testStep["working-directory"], undefined);
assert.equal(testStep["continue-on-error"] ?? false, false);
});
2 changes: 2 additions & 0 deletions typescript/README.md
Original file line number Diff line number Diff line change
Expand Up @@ -38,6 +38,8 @@ npm run build

Run the test suite with `npm test`. The Zod schema tests also compile their generated
TypeScript schema text to check for syntax errors and unresolved type references.
Node.js CI runs this suite across its Node.js matrix after a clean dependency
installation and workspace build.

To see TypeChat in action, we recommend exploring the [TypeChat example projects](https://github.com/microsoft/TypeChat/tree/main/typescript/examples). You can try them on your local machine or in a GitHub Codespace.

Expand Down
Loading