From bc61834742cfaca8504ca6c4a774981ca3b44349 Mon Sep 17 00:00:00 2001 From: Pieter de Bruin Date: Tue, 12 May 2026 08:47:19 +0200 Subject: [PATCH 1/2] Add CI workflow to build and test on PRs Runs npm ci, build, and vitest on Node 22 and 24 for every push to main and pull request. Matches the MicrosoftDocs/mcp CI pattern. Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com> --- .github/workflows/validate.yml | 25 +++++++++++++++++++++++++ 1 file changed, 25 insertions(+) create mode 100644 .github/workflows/validate.yml diff --git a/.github/workflows/validate.yml b/.github/workflows/validate.yml new file mode 100644 index 0000000..2131ac8 --- /dev/null +++ b/.github/workflows/validate.yml @@ -0,0 +1,25 @@ +name: Validate + +on: + push: + branches: [main] + pull_request: + branches: [main] + +jobs: + build-and-test: + runs-on: ubuntu-latest + strategy: + matrix: + node-version: [22, 24] + steps: + - uses: actions/checkout@v4 + - uses: actions/setup-node@v4 + with: + node-version: ${{ matrix.node-version }} + - run: npm ci + working-directory: cli + - run: npm run build + working-directory: cli + - run: npm test + working-directory: cli From 350c5773aad4ed4b61dcbe73301347ee51c906c1 Mon Sep 17 00:00:00 2001 From: Pieter de Bruin Date: Tue, 12 May 2026 08:50:34 +0200 Subject: [PATCH 2/2] Add npm cache to validate workflow Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com> --- .github/workflows/validate.yml | 2 ++ 1 file changed, 2 insertions(+) diff --git a/.github/workflows/validate.yml b/.github/workflows/validate.yml index 2131ac8..30c07ed 100644 --- a/.github/workflows/validate.yml +++ b/.github/workflows/validate.yml @@ -17,6 +17,8 @@ jobs: - uses: actions/setup-node@v4 with: node-version: ${{ matrix.node-version }} + cache: npm + cache-dependency-path: cli/package-lock.json - run: npm ci working-directory: cli - run: npm run build