-
-
Notifications
You must be signed in to change notification settings - Fork 3
44 lines (41 loc) · 1.07 KB
/
chdb-node-test.yml
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
name: chDB-node
on:
pull_request:
branches: [ "main" ]
paths-ignore:
- '**/.md'
push:
branches: [ "main" ]
paths-ignore:
- '**/.md'
jobs:
build:
runs-on: ${{ matrix.os }}
strategy:
matrix:
os: [ubuntu-latest, macos-latest]
node-version: [14.x, 16.x, 18.x]
steps:
- uses: actions/checkout@v3
- name: Use Node.js ${{ matrix.node-version }}
uses: actions/setup-node@v3
with:
node-version: ${{ matrix.node-version }}
registry-url: 'https://registry.npmjs.org'
- name: Use Python 3.11
uses: actions/setup-python@v2
with:
python-version: '3.11'
- name: Install dependencies
run: npm install
- name: Build libchdb
run: npm run libchdb
- name: Build project
run: npm run build
- name: Run tests
run: npm run test
- name: Publish to npm
if: github.ref == 'refs/heads/main' && matrix.node-version == '14.x' && matrix.os == 'ubuntu-latest'
run: npm publish
env:
NODE_AUTH_TOKEN: ${{ secrets.NPM_TOKEN }}