-
Notifications
You must be signed in to change notification settings - Fork 52
36 lines (35 loc) · 1.19 KB
/
run_tests_suite_coverage.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
name: Coverage Test
on:
workflow_dispatch: # Allow manual triggers
schedule:
- cron: 0 0 * * *
pull_request:
branches:
- main
jobs:
build:
runs-on: ubuntu-latest
timeout-minutes: 80
env:
COVERAGE_THRESHOlD: 80
steps:
- uses: actions/checkout@v2
- name: Install Python 3
uses: actions/setup-python@v1
with:
python-version: '3.10'
- name: Install dependencies
run: |
python -m pip install --upgrade pip
pip install -r requirements.txt
pip install coverage
- name: Prepare TF env
run: pip install tensorflow==2.13.*
- name: Run tensorflow testsuite
run: coverage run --parallel-mode -m --omit "./tests*,*__init__.py" unittest tests/test_suite.py -v
- name: Prepare Torch env
run: pip uninstall tensorflow -y && pip install torch==2.0.* torchvision onnx onnxruntime onnxruntime-extensions
- name: Run torch testsuite
run: coverage run --parallel-mode -m --omit "./tests*,*__init__.py" unittest tests/test_suite.py -v
- name: Run Coverage
run: coverage combine && coverage report -i --skip-covered --fail-under $COVERAGE_THRESHOlD