Add support of gh-actions

Publish via gh-actions

Add Black and flake8 linters
This commit is contained in:
Parth Shandilya
2020-12-29 11:54:22 +01:00
parent 61775ec5e6
commit 773c5d6af5
5 changed files with 111 additions and 45 deletions
+28
View File
@@ -0,0 +1,28 @@
name: CI
on:
push:
branches: master
pull_request:
branches: master
jobs:
lint:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v2
- name: Setup Python
uses: actions/setup-python@v2
with:
python-version: 3.9
- name: Check python code formatting
run: |
pip install black
black --check .
- name: Check compliance with pep8, pyflakes and circular complexity
run: |
pip install flake8
flake8 .
+31
View File
@@ -0,0 +1,31 @@
name: Publish
on:
push:
tags:
- v*
jobs:
Publish:
runs-on: ubuntu-latest
steps:
- name: Checkout
uses: actions/checkout@v2
- name: Set up Python
uses: actions/setup-python@v2
with:
python-version: 3.9
- name: Install dependencies
run: pip install setuptools wheel
- name: Build package
run: python setup.py sdist bdist_wheel
- name: Publish on PyPI
uses: pypa/gh-action-pypi-publish@v1.4.1
with:
user: __token__
password: ${{ secrets.pypi_token }}