-
Notifications
You must be signed in to change notification settings - Fork 34
66 lines (58 loc) · 1.51 KB
/
ci.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
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
name: Test
on:
pull_request_target:
branches:
- main
jobs:
test-py:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v2
- uses: actions-rs/toolchain@v1
with:
toolchain: stable
- uses: actions/setup-python@v2
with:
python-version: "3.10"
- name: Setup Python and Run Tests
working-directory: ./src/python
run: |
python3 -m venv .venv
source .venv/bin/activate
pip install pytest maturin patchelf
cd tests/
unzip test_demo.zip -d data/
unzip zipped_testdata.zip -d data/
cd ..
maturin develop --release
pytest
test-js:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v2
- name: Setup Node.js and Build
uses: actions/setup-node@v2
with:
node-version: "18" # Replace with the desired Node.js version
- name: Unzip Test Data
working-directory: ./src/node
run: |
cd tests/
unzip zipped_testdata.zip -d data/
cd ../..
- name: unzip demo from py dir
working-directory: ./src/python
run: |
cd tests/
7z x test_demo.zip
cd ../..
- name: Build
working-directory: ./src/node
run: |
yarn global add @napi-rs/cli
yarn build
- name: Test
working-directory: ./src/node
run: |
npm install --save-dev jest
npm test