Skip to content

Commit 2413676

Browse files
TypingKoalaJohnny Bui
andauthored
Add automated linting/testing Github Action (#22)
* Add automated testing Github Action * remove black requirement to fix PIP error * remove support for python 3.5 Co-authored-by: Johnny Bui <[email protected]>
1 parent 2165298 commit 2413676

File tree

3 files changed

+37
-2
lines changed

3 files changed

+37
-2
lines changed

.github/workflows/python-package.yml

Lines changed: 37 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,37 @@
1+
# This workflow will install Python dependencies, run tests and lint with a variety of Python versions
2+
# For more information see: https://help.github.com/actions/language-and-framework-guides/using-python-with-github-actions
3+
4+
name: Python package
5+
6+
on:
7+
push:
8+
branches: [ master ]
9+
pull_request:
10+
branches: [ master ]
11+
12+
jobs:
13+
build:
14+
15+
runs-on: ubuntu-latest
16+
strategy:
17+
matrix:
18+
python-version: [3.6, 3.7, 3.8]
19+
20+
steps:
21+
- uses: actions/checkout@v2
22+
- name: Set up Python ${{ matrix.python-version }}
23+
uses: actions/setup-python@v2
24+
with:
25+
python-version: ${{ matrix.python-version }}
26+
- name: Install dependencies
27+
run: |
28+
python -m pip install --upgrade pip
29+
pip install pylint pytest
30+
if [ -f requirements.txt ]; then pip install -r requirements.txt; fi
31+
- name: Lint with flake8
32+
run: |
33+
# stop the build if there are Python syntax errors or undefined names
34+
pylint -E ftpvl/
35+
- name: Test with pytest
36+
run: |
37+
pytest

README.md

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -41,7 +41,6 @@ make html
4141
* `pylint`: for linting ([website](https://www.pylint.org/))
4242
* `pytest`: testrunner ([website](https://docs.pytest.org/en/stable/))
4343
* `coverage`: for coverage testing ([website](https://coverage.readthedocs.io/))
44-
* `black`: for auto-formatting ([website](https://github.com/psf/black))
4544
* `sphinx`: for documentation generation ([website](https://www.sphinx-doc.org/en/master/))
4645
* `sphinx-rtd-theme`: for documentation generation (theme) ([website](https://github.com/readthedocs/sphinx_rtd_theme))
4746

requirements.txt

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -7,6 +7,5 @@ scipy
77
pylint
88
pytest
99
coverage
10-
black
1110
sphinx
1211
sphinx-rtd-theme

0 commit comments

Comments
 (0)