-
Notifications
You must be signed in to change notification settings - Fork 1.1k
65 lines (55 loc) · 1.56 KB
/
nodejs-sdk-tests.yml
File metadata and controls
65 lines (55 loc) · 1.56 KB
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
name: "Node.js SDK Tests"
env:
HUSKY: 0
on:
pull_request:
paths:
- 'nodejs/**'
- 'test/**'
- '.github/workflows/nodejs-sdk-tests.yml'
- '.github/actions/setup-copilot/**'
workflow_dispatch:
merge_group:
permissions:
contents: read
jobs:
test:
name: "Node.js SDK Tests"
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: 22
- uses: ./.github/actions/setup-copilot
id: setup-copilot
- 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 }}
COPILOT_CLI_PATH: ${{ steps.setup-copilot.outputs.cli-path }}
run: npm test