File tree Expand file tree Collapse file tree 3 files changed +80
-4
lines changed
Expand file tree Collapse file tree 3 files changed +80
-4
lines changed Original file line number Diff line number Diff line change 1+ # This workflow will install Python dependencies and upload a version in the PyPI
2+ name : CD - Upload PyPI
3+
4+ on :
5+ release :
6+ types : [ released ]
7+
8+ jobs :
9+ upload :
10+ runs-on : ubuntu-latest
11+
12+ steps :
13+ - uses : actions/checkout@v2
14+
15+ # Sets up python
16+ - uses : actions/setup-python@v2
17+ with :
18+ python-version : 3.7
19+
20+ # Install dependencies
21+ - name : " Installs dependencies"
22+ run : |
23+ python3 -m pip install --upgrade pip
24+ python3 -m pip install setuptools wheel twine
25+ python3 setup.py install
26+
27+ # Build and upload to PyPI
28+ - name : " Builds and uploads to PyPI"
29+ run : |
30+ python3 setup.py sdist bdist_wheel
31+ python3 -m twine check dist/*
32+ python3 -m twine upload dist/*
33+ env :
34+ TWINE_USERNAME : __token__
35+ TWINE_PASSWORD : ${{ secrets.PYPI_TOKEN }}
Original file line number Diff line number Diff line change 1+ # This workflow will install Python dependencies and upload a version in the PyPI test environment
2+ name : CD - Test PyPI
3+
4+ on :
5+ push :
6+ branches : [ master ]
7+
8+ # Allows you to run this workflow manually from the Actions tab
9+ workflow_dispatch :
10+
11+ jobs :
12+ build :
13+
14+ runs-on : ubuntu-latest
15+
16+ steps :
17+ - uses : actions/checkout@v2
18+
19+ # Sets up python
20+ - uses : actions/setup-python@v2
21+ with :
22+ python-version : 3.7
23+
24+ # Install dependencies
25+ - name : " Installs and upgrades pip, installs other dependencies and installs the package from setup.py"
26+ run : |
27+ python3 -m pip install --upgrade pip
28+ python3 -m pip install setuptools wheel twine
29+ python3 setup.py install
30+
31+ # Upload to TestPyPI
32+ - name : Build and Upload to TestPyPI
33+ run : |
34+ python3 setup.py sdist bdist_wheel
35+ python3 -m twine check dist/*
36+ python3 -m twine upload dist/*
37+ env :
38+ TWINE_USERNAME : __token__
39+ TWINE_PASSWORD : ${{ secrets.TEST_PYPI_TOKEN }}
40+ TWINE_REPOSITORY : testpypi
Original file line number Diff line number Diff line change 11# This workflow will install Python dependencies, run tests and lint with a variety of Python versions
22# For more information see: https://help.github.com/actions/language-and-framework-guides/using-python-with-github-actions
33
4- name : Python package
4+ name : CI - Lint and Tests
55
66on :
7- push :
8- branches :
9- - ' master'
107 pull_request :
118 branches :
129 - ' master'
@@ -25,19 +22,23 @@ jobs:
2522 uses : actions/setup-python@v2
2623 with :
2724 python-version : ${{ matrix.python-version }}
25+
2826 - name : Install dependencies
2927 run : |
3028 python -m pip install --upgrade pip
3129 python -m pip install requests
30+
3231 - name : Lint with Pylint
3332 run : |
3433 pip install pylint
3534 pylint mercadopago
3635 pylint --rcfile=tests/.pylintrc tests
36+
3737 - name : Lint with Isort
3838 run : |
3939 pip install isort
4040 isort .
41+
4142 - name : Test with unittest
4243 run : |
4344 python -m unittest discover tests/
You can’t perform that action at this time.
0 commit comments