Skip to content

Run SDK tests on push to main branch (#390) #135

Run SDK tests on push to main branch (#390)

Run SDK tests on push to main branch (#390) #135

name: "Node.js SDK Tests"
env:
HUSKY: 0
on:
push:
branches:
- main
pull_request:
paths:
- 'nodejs/**'
- 'test/**'
- '.github/workflows/nodejs-sdk-tests.yml'
- '!**/*.md'
- '!**/LICENSE*'
- '!**/.gitignore'
- '!**/.editorconfig'
- '!**/*.png'
- '!**/*.jpg'
- '!**/*.jpeg'
- '!**/*.gif'
- '!**/*.svg'
workflow_dispatch:
merge_group:
permissions:
contents: read
jobs:
test:
name: "Node.js SDK Tests"
env:
POWERSHELL_UPDATECHECK: Off
strategy:
fail-fast: false
matrix:
os: [ubuntu-latest, macos-latest, windows-latest]
runs-on: ${{ matrix.os }}
defaults:
run:
shell: bash
working-directory: ./nodejs
steps:
- uses: actions/checkout@v6.0.2
- uses: actions/setup-node@v6
with:
cache: "npm"
cache-dependency-path: "./nodejs/package-lock.json"
node-version: 24
- name: Install dependencies
run: npm ci --ignore-scripts
- name: Run prettier check
if: runner.os == 'Linux'
run: npm run format:check
- name: Run ESLint
run: npm run lint
- name: Typecheck SDK
run: npm run typecheck
- name: Install test harness dependencies
working-directory: ./test/harness
run: npm ci --ignore-scripts
- name: Warm up PowerShell
if: runner.os == 'Windows'
run: pwsh.exe -Command "Write-Host 'PowerShell ready'"
- name: Run Node.js SDK tests
env:
COPILOT_HMAC_KEY: ${{ secrets.COPILOT_DEVELOPER_CLI_INTEGRATION_HMAC_KEY }}
run: npm test