Skip to content

Commit 69c9d06

Browse files
committed
chore: add compatibility ci
1 parent 2393bbb commit 69c9d06

1 file changed

Lines changed: 56 additions & 0 deletions

File tree

Lines changed: 56 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,56 @@
1+
name: nodejs Compatibility
2+
3+
on:
4+
push:
5+
branches:
6+
- "main"
7+
- "3.0"
8+
pull_request:
9+
branches:
10+
- "main"
11+
- "3.0"
12+
13+
jobs:
14+
build:
15+
runs-on: ubuntu-22.04
16+
strategy:
17+
matrix:
18+
node-version: [16.x, 20.x]
19+
steps:
20+
- name: Get TDengine
21+
run: wget https://github.com/taosdata/TDengine/releases/download/ver-3.3.6.0/TDengine-server-3.3.6.0-Linux-x64.tar.gz
22+
23+
- name: Install TDengine
24+
run: |
25+
tar -zxf TDengine-server-3.3.6.0-Linux-x64.tar.gz
26+
rm -rf TDengine-server-3.3.6.0-Linux-x64.tar.gz
27+
cd TDengine-server-3.3.6.0
28+
sudo ./install.sh -e no
29+
30+
- name: Start TDengine
31+
run: |
32+
taosd &
33+
taosadapter &
34+
35+
- name: Checkout
36+
uses: actions/checkout@v4
37+
with:
38+
path: "nodejs-connector"
39+
clean: true
40+
set-safe-directory: true
41+
42+
- name: Use Node.js ${{ matrix.node-version }}
43+
uses: actions/setup-node@v3
44+
with:
45+
node-version: ${{ matrix.node-version }}
46+
47+
- name: Run tests
48+
working-directory: nodejs-connector/nodejs
49+
env:
50+
TDENGINE_CLOUD_URL: ${{ secrets.TDENGINE_CLOUD_URL }}
51+
TDENGINE_CLOUD_TOKEN: ${{ secrets.TDENGINE_CLOUD_TOKEN }}
52+
run: |
53+
npm install
54+
npm list
55+
npm run example
56+
npm run test

0 commit comments

Comments
 (0)