🚀 github actions for moban, pypi release and automatically extract contributors

This commit is contained in:
chfw 2020-08-23 01:23:06 +01:00
parent a3aad6d9fe
commit e4870b0a74
10 changed files with 84 additions and 30 deletions

View File

@ -3,10 +3,9 @@ With your PR, here is a check list:
- [ ] Has Test cases written
- [ ] Has all code lines tested
- [ ] Has `make format` been run?
- [ ] Has `moban` been run?
- [ ] Please update CHANGELOG.yml(not CHANGELOG.rst)
- [ ] Passes all Travis CI builds
- [ ] Has fair amount of documentation if your change is complex
- [ ] run 'make format' so as to confirm the pyexcel organisation's coding style
- [ ] Please update CHANGELOG.rst
- [ ] Please add yourself to CONTRIBUTORS.rst
- [ ] Please add yourself to 'contributors' section of pyexcel-xls.yml (if not found, please use CONTRIBUTORS.rst)
- [ ] Agree on NEW BSD License for your contribution

27
.github/workflows/moban-update.yml vendored Normal file
View File

@ -0,0 +1,27 @@
on: [push]
jobs:
run_moban:
runs-on: ubuntu-latest
name: synchronize templates via moban
steps:
- uses: actions/checkout@v2
with:
ref: ${{ github.head_ref }}
- name: Set up Python
uses: actions/setup-python@v1
with:
python-version: '3.7'
- name: check changes
run: |
pip install moban gitfs2 pypifs
moban
git status
git diff --exit-code
- name: Auto-commit
if: failure()
uses: docker://cdssnc/auto-commit-github-action
env:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
with:
args: This is an auto-commit, updating project meta data, such as changelog.rst, contributors.rst

26
.github/workflows/pythonpublish.yml vendored Normal file
View File

@ -0,0 +1,26 @@
name: Upload Python Package
on:
release:
types: [created]
jobs:
deploy:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v1
- name: Set up Python
uses: actions/setup-python@v1
with:
python-version: '3.x'
- name: Install dependencies
run: |
python -m pip install --upgrade pip
pip install setuptools wheel twine
- name: Build and publish
env:
TWINE_USERNAME: ${{ secrets.PYPI_USERNAME }}
TWINE_PASSWORD: ${{ secrets.PYPI_PASSWORD }}
run: |
python setup.py sdist bdist_wheel
twine upload dist/*

7
CONTRIBUTORS.rst Normal file
View File

@ -0,0 +1,7 @@
1 contributors
================================================================================
In alphabetical order:
* `John Vandenberg <https://api.github.com/users/jayvdb>`_

View File

@ -1,9 +1,19 @@
all: test
test:
test: lint
bash test.sh
install_test:
pip install -r tests/requirements.txt
git-diff-check:
git diff --exit-code
lint:
bash lint.sh
format:
isort -y $(find pyexcel_xls -name "*.py"|xargs echo) $(find tests -name "*.py"|xargs echo)
black -l 79 pyexcel_xls
black -l 79 tests
bash format.sh
git-diff-check:
git diff --exit-code

View File

@ -365,22 +365,6 @@ Please run::
so as to beautify your code otherwise travis-ci may fail your unit test.
And make sure you would have run moban command
---------------------------------------------------------
Additional steps are required:
#. pip install moban
#. make your changes in `.moban.d` directory, then issue command `moban`
#. moban
otherwise travis-ci may also fail your unit test.
What is .moban.d
---------------------------------
`.moban.d` stores the specific meta data for the library.
Known Issues
=============

View File

@ -24,7 +24,7 @@ DESCRIPTION = (
project = 'pyexcel-xls'
copyright = '2015-2019 Onni Software Ltd.'
author = 'C.W.'
author = 'chfw'
# The short X.Y version
version = '0.6.0'
# The full version, including alpha/beta/rc tags

View File

@ -1,2 +1,3 @@
pip install flake8
flake8 . --exclude=.moban.d,docs,setup.py --builtins=unicode,xrange,long
flake8 . --exclude=.moban.d,docs,setup.py --builtins=unicode,xrange,long
python setup.py checkdocs

View File

@ -31,7 +31,7 @@ except (ValueError, UnicodeError, locale.Error):
locale.setlocale(locale.LC_ALL, "en_US.UTF-8")
NAME = "pyexcel-xls"
AUTHOR = "C.W."
AUTHOR = "chfw"
VERSION = "0.6.0"
EMAIL = "info@pyexcel.org"
LICENSE = "New BSD"

View File

@ -3,8 +3,8 @@ mock;python_version<"3"
codecov
coverage
flake8
pyexcel
xlrd==1.1.0
black
isort
collective.checkdocs
pygments
moban
black;python_version>="3.6"
isort;python_version>="3.6"