File tree Expand file tree Collapse file tree
Expand file tree Collapse file tree Original file line number Diff line number Diff line change 1- name : Test
1+ name : unit test
2+
23on :
3- - push
4- - pull_request_target
4+ push :
5+ branches : [ master ]
6+ pull_request :
7+
58jobs :
6- lint :
7- runs-on : ubuntu-18.04
8- steps :
9- - uses : actions/setup-python@v2
10- - uses : actions/checkout@v2
11- - run : pip install flake8
12- - run : flake8
13- unit-test :
14- needs : lint
9+ unit_tests :
10+ runs-on : ubuntu-latest
1511 strategy :
1612 matrix :
17- python :
18- - 2.7
19- - 3.5
20- runs-on : ubuntu-18.04
13+ python-version : [3.7, 3.8, 3.9]
2114 steps :
22- - uses : actions/setup-python@v2
15+ - name : Check out repo
16+ uses : actions/checkout@v2
17+ - name : Setup conda env
18+ uses : conda-incubator/setup-miniconda@v2
2319 with :
24- python-version : ${{ matrix.python }}
25- - uses : actions/checkout@v2
26- - run : pip install -e .[test]
27- - run : ./test/run_test.sh
20+ miniconda-version : " latest"
21+ activate-environment : test
22+ python-version : ${{ matrix.python-version }}
23+ - name : Install dependencies
24+ shell : bash -l {0}
25+ run : |
26+ set -eux
27+ conda activate test
28+ conda install pytorch cpuonly -c pytorch-nightly
29+ pip install -r requirements.txt
30+ - name : Run unit tests with coverage
31+ shell : bash -l {0}
32+ run : |
33+ set -eux
34+ conda activate test
35+ pytest --cov=. --cov-report xml tests -vv
36+ - name : Upload Coverage to Codecov
37+ uses : codecov/codecov-action@v2
You can’t perform that action at this time.
0 commit comments