@@ -2,17 +2,12 @@ name: Test
22on : [push, pull_request]
33jobs :
44 check :
5- if : github.event_name != 'pull_request' || github.head_ref != 'devel '
5+ if : github.event_name != 'pull_request' || github.repository_owner != 'NiftyPET '
66 runs-on : ubuntu-latest
7- strategy :
8- matrix :
9- python : [3.6, 3.9]
10- name : Check py${{ matrix.python }}
7+ name : Check
118 steps :
129 - uses : actions/checkout@v2
1310 - uses : actions/setup-python@v2
14- with :
15- python-version : ${{ matrix.python }}
1611 - name : set PYSHA
1712 run : echo "PYSHA=$(python -VV | sha256sum | cut -d' ' -f1)" >> $GITHUB_ENV
1813 - uses : actions/cache@v1
2419 pip install -U pre-commit
2520 sudo apt-get install -yqq clang-format
2621 - uses : reviewdog/action-setup@v1
27- - if : github.event_name != 'schedule '
22+ - if : github.event_name == 'push' || github.event_name == 'pull_request '
2823 name : comment
2924 run : |
3025 if [[ $EVENT == pull_request ]]; then
@@ -39,20 +34,23 @@ jobs:
3934 EVENT : ${{ github.event_name }}
4035 - run : pre-commit run -a --show-diff-on-failure
4136 test :
42- if : github.event_name != 'pull_request' || github.head_ref != 'devel'
37+ if : github.event_name != 'pull_request' || github.repository_owner != 'NiftyPET'
38+ name : Test py${{ matrix.python }}
4339 runs-on : [self-hosted, python, cuda, matlab]
44- name : Test
40+ strategy :
41+ matrix :
42+ python : [3.6, 3.9]
4543 steps :
4644 - uses : actions/checkout@v2
4745 with :
4846 fetch-depth : 0
4947 - name : Run setup-python
50- run : setup-python -p3.7
48+ run : setup-python -p${{ matrix.python }}
5149 - run : pip install -U --no-binary nimpa -e .[dev]
5250 - run : pytest
53- - run : codecov
51+ - uses : codecov/codecov-action@v1
5452 - name : Post Run setup-python
55- run : setup-python -p3.7 -Dr
53+ run : setup-python -p${{ matrix.python }} -Dr
5654 if : ${{ always() }}
5755 deploy :
5856 needs : [check, test]
0 commit comments