-
Notifications
You must be signed in to change notification settings - Fork 11
46 lines (44 loc) · 1.23 KB
/
test_install_import.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
45
46
name: Test Install & Import
on:
push:
branches: [ "main" ]
pull_request:
branches: [ "main" ]
jobs:
test:
strategy:
fail-fast: false
matrix:
node: ['14', '16', '18', '20']
os: [macos-latest, windows-latest, ubuntu-latest]
runs-on: ${{ matrix.os }}
steps:
- uses: actions/checkout@v3
- name: Setup node ${{ matrix.node }}
uses: actions/setup-node@v3
with:
node-version: ${{ matrix.node }}
- name: NPM Pack
run: npm pack
- name: Rename Package
run: mv faiss-node-*.tgz faiss-node.tgz
- name: NPM Install
working-directory: ./test-import
run: npm install ../faiss-node.tgz --verbose
- name: Test
working-directory: ./test-import
run: npm test
- name: Uninstall libomp
if: matrix.os == 'macos-latest'
run: brew uninstall --ignore-dependencies libomp
- name: Test without libomp
if: matrix.os == 'macos-latest'
working-directory: ./test-import
run: npm test
- name: Install libomp
if: matrix.os == 'macos-latest'
run: brew install libomp
- name: Test with libomp installed
if: matrix.os == 'macos-latest'
working-directory: ./test-import
run: npm test