fengmiguoji commited on
Commit
ea40f41
·
verified ·
1 Parent(s): 9049a29

Upload .github\workflows\tool-test-sdks.yaml with huggingface_hub

Browse files
.github//workflows//tool-test-sdks.yaml ADDED
@@ -0,0 +1,44 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ name: Run Unit Test For SDKs
2
+
3
+ on:
4
+ pull_request:
5
+ branches:
6
+ - main
7
+ paths:
8
+ - sdks/**
9
+
10
+ concurrency:
11
+ group: sdk-tests-${{ github.head_ref || github.run_id }}
12
+ cancel-in-progress: true
13
+
14
+ jobs:
15
+ build:
16
+ name: unit test for Node.js SDK
17
+ runs-on: ubuntu-latest
18
+
19
+ strategy:
20
+ matrix:
21
+ node-version: [16, 18, 20]
22
+
23
+ defaults:
24
+ run:
25
+ working-directory: sdks/nodejs-client
26
+
27
+ steps:
28
+ - uses: actions/checkout@v4
29
+ with:
30
+ fetch-depth: 0
31
+ persist-credentials: false
32
+
33
+ - name: Use Node.js ${{ matrix.node-version }}
34
+ uses: actions/setup-node@v4
35
+ with:
36
+ node-version: ${{ matrix.node-version }}
37
+ cache: ''
38
+ cache-dependency-path: 'pnpm-lock.yaml'
39
+
40
+ - name: Install Dependencies
41
+ run: pnpm install
42
+
43
+ - name: Test
44
+ run: pnpm test