Skip to content

Commit 9adea9b

Browse files
authored
Create Github Action (#192)
* Create python-package.yml * Updated coverage * Updated flake8
1 parent bcd400c commit 9adea9b

File tree

4 files changed

+82
-43
lines changed

4 files changed

+82
-43
lines changed

.github/workflows/python-package.yml

+44
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,44 @@
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 pipenv
30+
pipenv lock --dev --requirements > requirements.txt
31+
pip install -r requirements.txt
32+
- name: Test with pytest
33+
run: |
34+
python setup.py test
35+
- name: Lint with flake8
36+
run: |
37+
# stop the build if there are Python syntax errors or undefined names
38+
flake8 . --count --select=E9,F63,F7,F82 --ignore=E501 --show-source --statistics --exit-zero --max-complexity=10 --max-line-length=127 --statistics
39+
- name: Lint with pylint
40+
run: |
41+
pylint --rcfile=pylintrc project
42+
- name: Security safety
43+
run: |
44+
safety check

Pipfile

+2-2
Original file line numberDiff line numberDiff line change
@@ -13,10 +13,10 @@ marshmallow-sqlalchemy = "==0.23.1"
1313

1414
[dev-packages]
1515
requests-mock = "*"
16-
coverage = "==4.5.4"
16+
coverage = ">=5.3"
1717
pytest = ">=5.4.3"
1818
pytest-cov = ">=2.9.0"
19-
pylint = "*"
19+
pylint = ">=2.6.0"
2020
flake8 = "*"
2121
tox = "*"
2222
bandit = "*"

Pipfile.lock

+36-34
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

requirements-tests.txt

-7
This file was deleted.

0 commit comments

Comments
 (0)