Skip to content

Commit 50acc3a

Browse files
committed
Add GitHub workflow for chat-lib
1 parent f87f590 commit 50acc3a

File tree

1 file changed

+54
-0
lines changed

1 file changed

+54
-0
lines changed

.github/workflows/npm-package.yml

Lines changed: 54 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,54 @@
1+
name: chat-lib tests
2+
3+
on:
4+
pull_request:
5+
workflow_dispatch:
6+
7+
permissions:
8+
contents: read
9+
10+
concurrency:
11+
group: chat-lib-tests-${{ github.workflow }}-${{ github.event.pull_request.number || github.ref }}
12+
cancel-in-progress: true
13+
14+
jobs:
15+
test:
16+
name: chat-lib tests (${{ matrix.os }})
17+
runs-on: ${{ matrix.os }}
18+
timeout-minutes: 30
19+
strategy:
20+
fail-fast: false
21+
matrix:
22+
os: [ubuntu-latest, macos-latest, windows-latest]
23+
24+
steps:
25+
- name: Checkout
26+
uses: actions/checkout@v4
27+
28+
- name: Setup Node.js
29+
uses: actions/setup-node@v4
30+
with:
31+
node-version: 22.x
32+
cache: npm
33+
cache-dependency-path: |
34+
package-lock.json
35+
chat-lib/package-lock.json
36+
37+
- name: Extract chat-lib
38+
shell: bash
39+
run: |
40+
npm ci
41+
npm run extract-chat-lib
42+
rm -rf node_modules
43+
44+
- name: Install chat-lib dependencies
45+
working-directory: chat-lib
46+
run: npm ci
47+
48+
- name: Build chat-lib
49+
working-directory: chat-lib
50+
run: npm run build
51+
52+
- name: Test chat-lib
53+
working-directory: chat-lib
54+
run: npm test

0 commit comments

Comments
 (0)