Skip to content

Commit

Permalink
Create Github Action (#192)
Browse files Browse the repository at this point in the history
* Create python-package.yml

* Updated coverage

* Updated flake8
  • Loading branch information
avara1986 committed Sep 27, 2020
1 parent bcd400c commit 9adea9b
Show file tree
Hide file tree
Showing 4 changed files with 82 additions and 43 deletions.
44 changes: 44 additions & 0 deletions .github/workflows/python-package.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,44 @@
# This workflow will install Python dependencies, run tests and lint with a variety of Python versions
# For more information see: https://help.github.com/actions/language-and-framework-guides/using-python-with-github-actions

name: Python package

on:
push:
branches: [ master ]
pull_request:
branches: [ master ]

jobs:
build:

runs-on: ubuntu-latest
strategy:
matrix:
python-version: [3.6, 3.7, 3.8]

steps:
- uses: actions/checkout@v2
- name: Set up Python ${{ matrix.python-version }}
uses: actions/setup-python@v2
with:
python-version: ${{ matrix.python-version }}
- name: Install dependencies
run: |
python -m pip install --upgrade pip
pip install pipenv
pipenv lock --dev --requirements > requirements.txt
pip install -r requirements.txt
- name: Test with pytest
run: |
python setup.py test
- name: Lint with flake8
run: |
# stop the build if there are Python syntax errors or undefined names
flake8 . --count --select=E9,F63,F7,F82 --ignore=E501 --show-source --statistics --exit-zero --max-complexity=10 --max-line-length=127 --statistics
- name: Lint with pylint
run: |
pylint --rcfile=pylintrc project
- name: Security safety
run: |
safety check
4 changes: 2 additions & 2 deletions Pipfile
Original file line number Diff line number Diff line change
Expand Up @@ -13,10 +13,10 @@ marshmallow-sqlalchemy = "==0.23.1"

[dev-packages]
requests-mock = "*"
coverage = "==4.5.4"
coverage = ">=5.3"
pytest = ">=5.4.3"
pytest-cov = ">=2.9.0"
pylint = "*"
pylint = ">=2.6.0"
flake8 = "*"
tox = "*"
bandit = "*"
Expand Down
70 changes: 36 additions & 34 deletions Pipfile.lock

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

7 changes: 0 additions & 7 deletions requirements-tests.txt

This file was deleted.

0 comments on commit 9adea9b

Please sign in to comment.