-
Notifications
You must be signed in to change notification settings - Fork 23
36 lines (29 loc) · 1009 Bytes
/
test.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: pytest
on: [ push ]
jobs:
build:
runs-on: ubuntu-latest
if: "!contains(github.event.head_commit.message, 'skip test')"
strategy:
matrix:
python: [ '3.9' ]
torch: [ 'torch==1.10.0+cpu torchvision==0.11.1+cpu -f https://download.pytorch.org/whl/torch_stable.html',
'torch==1.9.0+cpu torchvision==0.10.0+cpu -f https://download.pytorch.org/whl/torch_stable.html',
'--pre torch torchvision -f https://download.pytorch.org/whl/nightly/cpu/torch_nightly.html' ]
steps:
- uses: actions/checkout@v2
- uses: actions/setup-python@v1
with:
python-version: ${{ matrix.python }}
- name: install dependencies
run: |
python -m venv venv
. venv/bin/activate
pip install -U numpy
pip install ${{ matrix.torch }}
pip install -U pytest
pip install -U .
- name: run test
run: |
. venv/bin/activate
pytest