1- name : Python build and tests
1+ name : Python build and test and deploy
22
33on :
44 push :
1919 - name : Set up Python
2020 uses : actions/setup-python@v1
2121 with :
22- python-version : 3.6
22+ python-version : 3.7
2323
2424 - name : Update pip, setuptools, and wheel
2525 run : python -m pip install --upgrade pip setuptools wheel
5353 fail-fast : false
5454 matrix :
5555 platform : [ubuntu-latest, macos-latest, windows-latest]
56- python-version : [3.6 ]
56+ python-version : [3.7 ]
5757
5858 runs-on : ${{ matrix.platform }}
59+ needs : [build]
5960
6061 steps :
6162 - uses : actions/checkout@v2
@@ -67,21 +68,55 @@ jobs:
6768
6869 - name : Install dependencies
6970 run : |
70- python -m pip install --upgrade pip
71- pip install -e .[test]
71+ make inplace
7272
7373 - name : Check formatting
7474 if : " matrix.platform == 'ubuntu-latest'"
7575 run : |
76- flake8 --docstring-convention numpy .
77- check-manifest .
76+ make flake
77+ make check-manifest
7878
7979 - name : Test with pytest
8080 run : |
81- pytest --doctest-modules --cov=eeg_positions/ --cov-report=xml --cov-config=setup.cfg --verbose -s
81+ make test
8282
8383 - name : Upload coverage report
8484 if : " matrix.platform == 'ubuntu-latest'"
8585 uses : codecov/codecov-action@v1
8686 with :
8787 file : ./coverage.xml
88+
89+ - name : build docs
90+ if : " matrix.platform == 'ubuntu-latest'"
91+ run : |
92+ make build-doc
93+
94+ - name : Upload docs build artifacts
95+ if : " matrix.platform == 'ubuntu-latest'"
96+ uses : actions/upload-artifact@v2
97+ with :
98+ name : docs-artifact
99+ path : docs/_build/html
100+
101+ deploy :
102+
103+ runs-on : ubuntu-latest
104+ needs : [build, test]
105+ if : github.ref == 'refs/heads/master' # only run on master
106+
107+ steps :
108+ - uses : actions/checkout@v2
109+
110+ - name : Download docsbuild artifacts
111+ uses : actions/download-artifact@v2
112+ with :
113+ name : docs-artifact
114+ path : docs/_build/html
115+
116+ - name : Deploy
117+ 118+ with :
119+ GITHUB_TOKEN : ${{ secrets.GITHUB_TOKEN }}
120+ BRANCH : gh-pages # The branch the action should deploy to.
121+ FOLDER : docs/_build/html # The folder the action should deploy.
122+ CLEAN : true # Automatically remove deleted files from the deploy branch
0 commit comments