|
1 | 1 | name: Unit Tests |
2 | 2 |
|
3 | 3 | on: |
4 | | - - push |
5 | | - - pull_request |
| 4 | + push: |
| 5 | + pull_request: |
| 6 | + types: [opened, reopened] |
6 | 7 |
|
7 | 8 | jobs: |
8 | 9 | unit: |
9 | 10 | runs-on: ${{ matrix.os }} |
10 | 11 | strategy: |
11 | 12 | matrix: |
12 | | - python-version: [3.6, 3.7, 3.8, 3.9] |
13 | | - os: [ubuntu-latest, macos-10.15, windows-latest] |
| 13 | + python-version: ['3.8', '3.9', '3.10', '3.11'] |
| 14 | + os: [ubuntu-latest, macos-latest, windows-latest] |
14 | 15 | steps: |
15 | 16 | - uses: actions/checkout@v1 |
16 | 17 | - name: Set up Python ${{ matrix.python-version }} |
17 | | - uses: actions/setup-python@v1 |
| 18 | + uses: actions/setup-python@v2 |
18 | 19 | with: |
19 | 20 | python-version: ${{ matrix.python-version }} |
20 | | - - if: matrix.os == 'windows-latest' |
21 | | - name: Install dependencies - Windows |
22 | | - run: | |
23 | | - python -m pip install --upgrade pip |
24 | | - python -m pip install 'torch>=1.8,<2' -f https://download.pytorch.org/whl/cpu/torch/ |
25 | | - python -m pip install 'torchvision>=0.9.0,<1' -f https://download.pytorch.org/whl/cpu/torchvision/ |
26 | 21 | - name: Install dependencies |
27 | 22 | run: | |
28 | 23 | python -m pip install --upgrade pip |
29 | 24 | python -m pip install invoke .[test] |
30 | 25 | - name: Run unit tests |
31 | 26 | run: invoke unit |
32 | | - - if: matrix.os == 'ubuntu-latest' && matrix.python-version == 3.8 |
33 | | - name: Upload codecov report |
34 | | - uses: codecov/codecov-action@v2 |
0 commit comments