Skip to content

Commit e7c8202

Browse files
Add github actions.
1 parent 17a8212 commit e7c8202

File tree

1 file changed

+31
-0
lines changed

1 file changed

+31
-0
lines changed

.github/workflows/pytest.yml

Lines changed: 31 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,31 @@
1+
2+
name: Validate Python Code
3+
4+
on: [push, pull_request]
5+
6+
jobs:
7+
build:
8+
9+
runs-on: ubuntu-latest
10+
strategy:
11+
matrix:
12+
python-version: ["3.6", "3.7", "3.8", "3.9"]
13+
14+
steps:
15+
- uses: actions/checkout@v3
16+
- name: Set up Python ${{ matrix.python-version }}
17+
uses: actions/setup-python@v3
18+
with:
19+
python-version: ${{ matrix.python-version }}
20+
- name: Install dependencies
21+
run: |
22+
python -m pip install --upgrade pip
23+
pip install flake8 pytest
24+
if [ -f requirements.txt ]; then pip install -r requirements.txt; fi
25+
- name: Lint with flake8
26+
run: |
27+
flake8 matplotview --count --select=E9,F63,F7,F82 --show-source --statistics
28+
flake8 matplotview --count --exit-zero --max-complexity=10 --max-line-length=127 --statistics
29+
- name: Test with pytest
30+
run: |
31+
pytest

0 commit comments

Comments
 (0)