-
Notifications
You must be signed in to change notification settings - Fork 15
49 lines (42 loc) · 1.24 KB
/
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
45
46
47
48
49
name: Test
on:
push:
branches: [main]
pull_request:
workflow_dispatch:
jobs:
Test:
runs-on: ubuntu-latest
strategy:
matrix:
python-version: ['3.8', '3.9', '3.10']
name: Run Unittests and Examples (Python ${{ matrix.python-version }})
steps:
- name: Checkout
uses: actions/checkout@v3
- name: Install python
uses: actions/setup-python@v4
with:
python-version: ${{ matrix.python-version }}
- name: Install dependencies
run: |
pip install --upgrade pip
pip install -r requirements_dev.txt
- name: Build
run: |
pip install -e .
- name: Run unit tests
run: |
pytest
- name: Run examples
run: |
EXAMPLES="examples/*.py"
for example_file in $EXAMPLES
do
echo "=================================================="
echo "Processing $example_file file..."
echo "=================================================="
python $example_file || exit 1
done
echo "running native interpreter example"
(cd examples/native_interpreter; ./build_it.sh && python use_interpreter.py)