-
Notifications
You must be signed in to change notification settings - Fork 52
31 lines (31 loc) · 1.11 KB
/
api-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
name: Run API unit tests
on:
[push, pull_request]
jobs:
run-tests:
runs-on: ubuntu-latest
steps:
- name: Checkout
uses: actions/checkout@v2
- uses: actions/setup-python@v4
with:
python-version: '3.9'
- name: install
run: |
echo `python3 --version`
cd torch_ort
python3 -m pip install --upgrade protobuf==3.20.2
python3 -m pip install --pre onnxruntime-training --no-cache-dir -f https://download.onnxruntime.ai/onnxruntime_nightly_cpu.html
python3 -m pip install torch==1.13.1+cpu -f https://download.pytorch.org/whl/torch_stable.html
python3 setup.py install --prefix=/tmp
python3 -m torch_ort.configure
python3 -m pip install pytest
- name: Print test message
run: echo Running torch-ort API unit tests
- name: Run tests
run: |
echo `python3 --version`
cd torch_ort
python -m pytest -sv tests/torch-ort_test_api.py
python -m pytest -sv tests/experimental/torch_ort_graph_config_tests.py
python -m pytest -sv tests/experimental/torch_ort_json_config_tests.py