File tree Expand file tree Collapse file tree 2 files changed +39
-5
lines changed Expand file tree Collapse file tree 2 files changed +39
-5
lines changed Original file line number Diff line number Diff line change 1
1
name : Code Quality
2
2
3
3
on :
4
- push :
5
- tags : ["[0-9]+.[0-9]+.[0-9]+"]
6
4
pull_request :
7
5
branches : [main, release/*]
8
6
7
+ # Cancel previous runs if new commit is pushed to the same PR
8
+ concurrency :
9
+ group : ${{ github.workflow }}-${{ github.event.pull_request.number }}
10
+ cancel-in-progress : true
11
+
9
12
jobs :
10
13
code-quality :
11
14
runs-on : ubuntu-latest
15
18
- uses : actions/setup-python@v5
16
19
with :
17
20
python-version : " 3.12"
18
- - name : Install tox
19
- run : pip install tox
20
21
- name : Run code quality checks
21
- run : tox -e pre-commit-all
22
+ run : pip install tox && tox -e pre-commit-all
Original file line number Diff line number Diff line change
1
+ name : Unit tests
2
+
3
+ on :
4
+ pull_request :
5
+ branches : [main, release/*]
6
+ paths :
7
+ - " .github/workflows/unit_tests.yml"
8
+ - " modelopt/**"
9
+ - " tests/**"
10
+ - " setup.py"
11
+ - " tox.ini"
12
+
13
+ # Cancel previous runs if new commit is pushed to the same PR
14
+ concurrency :
15
+ group : ${{ github.workflow }}-${{ github.event.pull_request.number }}
16
+ cancel-in-progress : true
17
+
18
+ jobs :
19
+ unit-tests :
20
+ runs-on : ubuntu-latest
21
+ timeout-minutes : 30
22
+ steps :
23
+ - uses : actions/checkout@v4
24
+ - uses : actions/setup-python@v5
25
+ with :
26
+ python-version : " 3.12"
27
+ # Build onnxsim from sdists for Python 3.12 until http://github.com/daquexian/onnx-simplifier/pull/353
28
+ - name : Install dependencies
29
+ run : |
30
+ pip install onnxsim
31
+ pip install tox
32
+ - name : Run unit tests
33
+ run : tox -e py312-torch27-unit
You can’t perform that action at this time.
0 commit comments