From 5ff0de18941d0104eed9a6c2d534e98364539614 Mon Sep 17 00:00:00 2001 From: peteryuqin Date: Mon, 16 Mar 2026 23:40:28 -0400 Subject: [PATCH] ci: add GitHub Actions workflow to run tests on PRs Runs the test suite (`node --test test/*.test.js`) and TypeScript build on every push to main and every pull request. Tests against Node.js 20 and 22 to match the project's minimum supported version. Signed-off-by: Peter Tam Signed-off-by: peteryuqin --- .github/workflows/test.yml | 36 ++++++++++++++++++++++++++++++++++++ 1 file changed, 36 insertions(+) create mode 100644 .github/workflows/test.yml diff --git a/.github/workflows/test.yml b/.github/workflows/test.yml new file mode 100644 index 000000000..e0b2acaf2 --- /dev/null +++ b/.github/workflows/test.yml @@ -0,0 +1,36 @@ +# SPDX-FileCopyrightText: Copyright (c) 2026 NVIDIA CORPORATION & AFFILIATES. All rights reserved. +# SPDX-License-Identifier: Apache-2.0 + +name: Test + +on: + push: + branches: [main] + pull_request: + branches: [main] + +jobs: + test: + runs-on: ubuntu-latest + strategy: + matrix: + node-version: [20, 22] + steps: + - uses: actions/checkout@v4 + + - name: Use Node.js ${{ matrix.node-version }} + uses: actions/setup-node@v4 + with: + node-version: ${{ matrix.node-version }} + + - name: Install host dependencies + run: npm ci + + - name: Install plugin dependencies + run: cd nemoclaw && npm ci + + - name: Build TypeScript plugin + run: cd nemoclaw && npm run build + + - name: Run tests + run: node --test test/*.test.js