File tree Expand file tree Collapse file tree 6 files changed +67
-10
lines changed
Expand file tree Collapse file tree 6 files changed +67
-10
lines changed Original file line number Diff line number Diff line change 1+ name : publish
2+
3+ on :
4+ release :
5+ types : [released]
6+
7+ jobs :
8+ release :
9+ runs-on : ubuntu-latest
10+ steps :
11+ - uses : actions/checkout@v2
12+ - name : Set up Python 3.8
13+ uses : actions/setup-python@v2
14+ with :
15+ python-version : 3.8
16+ - name : Install Tools
17+ run : |
18+ python -m pip install --upgrade pip
19+ pip install setuptools wheel twine
20+ - name : Package and Upload
21+ env :
22+ PACKAGE_VERSION : ${{ github.event.release.tag_name }}
23+ TWINE_USERNAME : __token__
24+ TWINE_PASSWORD : ${{ secrets.PYPI }}
25+ run : |
26+ python setup.py sdist bdist_wheel
27+ twine upload dist/*
Original file line number Diff line number Diff line change 1+ name : test
2+
3+ on :
4+ push :
5+ branches-ignore :
6+ - master
7+ pull_request :
8+ branches : [ develop ]
9+
10+ jobs :
11+ test :
12+ runs-on : ubuntu-latest
13+ strategy :
14+ matrix :
15+ python-version : ['3.6', '3.7', '3.8']
16+
17+ steps :
18+ - uses : actions/checkout@v2
19+ - name : Set up Python ${{ matrix.python-version }}
20+ uses : actions/setup-python@v2
21+ with :
22+ python-version : ${{ matrix.python-version }}
23+ - name : Install dependencies
24+ run : |
25+ python -m pip install --upgrade pip
26+ pip install tox
27+ if [ -f requirements.txt ]; then pip install -r requirements.txt; fi
28+ - name : Test with tox
29+ run : |
30+ tox -e setup,flake8
Original file line number Diff line number Diff line change 55 - python -V
66 - pip install tox
77 coverage : ' /TOTAL.+ ([0-9]{1,3}%)/'
8- artifacts :
9- paths :
10- - htmlcov
11- expire_in : 2 days
128
139test:python27 :
1410 << : *test-commands
Original file line number Diff line number Diff line change 1- from .permissions import * # noqa
1+ import os
2+ from .permissions import is_demo
3+ from .permissions import SimplePermissions
24
35
4- __version__ = ' 0.0.1'
6+ __version__ = os . environ . get ( 'PACKAGE_VERSION' , ' 0.0.0' ),
57__all__ = ['SimplePermissions' , 'is_demo' ]
Original file line number Diff line number Diff line change 1+ import os
12from setuptools import setup
23
34setup (name = 'drf-simplepermissions' ,
4- version = ' 0.0.4' ,
5+ version = os . environ . get ( 'PACKAGE_VERSION' , ' 0.0.0' ) ,
56 description = 'SimplePermissions checks against a list of permissions' ,
6- url = 'https://git.sensson.net /bellmann/python-drf-simplepermissions' ,
7+ url = 'https://github.com /bellmann/python-drf-simplepermissions' ,
78 author = 'Bellmann BV' ,
8- author_email = 'ton @bellmann.nl' ,
9+ author_email = 'opensource @bellmann.nl' ,
910 packages = ['drf_simplepermissions' ],
1011 install_requires = [
1112 'django' ,
1213 'djangorestframework' ,
1314 ],
15+ python_requires = '>=3.4' ,
1416 zip_safe = False )
Original file line number Diff line number Diff line change @@ -21,4 +21,4 @@ commands =
2121
2222[testenv:flake8]
2323deps = flake8
24- commands = flake8 gongchang
24+ commands = flake8 drf_simplepermissions
You can’t perform that action at this time.
0 commit comments