File tree Expand file tree Collapse file tree 3 files changed +63
-13
lines changed
Expand file tree Collapse file tree 3 files changed +63
-13
lines changed Original file line number Diff line number Diff line change 1+ # This workflow will install Python dependencies, run tests and lint with a variety of Python versions
2+ # For more information see: https://help.github.com/actions/language-and-framework-guides/using-python-with-github-actions
3+
4+ name : Python package
5+
6+ on : [push, pull_request]
7+
8+ jobs :
9+ build :
10+
11+ runs-on : ubuntu-latest
12+ strategy :
13+ matrix :
14+ python-version : [3.5, '3.x']
15+
16+ steps :
17+ - uses : actions/checkout@v2
18+ - name : Set up Python ${{ matrix.python-version }}
19+ uses : actions/setup-python@v1
20+ with :
21+ python-version : ${{ matrix.python-version }}
22+ - name : Install dependencies
23+ run : |
24+ python -m pip install --upgrade pip
25+ pip install pytest pytest-cov codacy-coverage
26+ pip install -e .
27+ - name : Test with pytest
28+ run : |
29+ pytest -v --cov-report xml --cov=canopen test/
30+ - name : Upload coverage
31+ run : |
32+ python-codacy-coverage
Original file line number Diff line number Diff line change 1+ # This workflows will upload a Python Package using Twine when a release is created
2+ # For more information see: https://help.github.com/en/actions/language-and-framework-guides/using-python-with-github-actions#publishing-to-package-registries
3+
4+ name : Upload Python Package
5+
6+ on :
7+ release :
8+ types : [created]
9+
10+ jobs :
11+ deploy :
12+
13+ runs-on : ubuntu-latest
14+
15+ steps :
16+ - uses : actions/checkout@v2
17+ - name : Set up Python
18+ uses : actions/setup-python@v1
19+ with :
20+ python-version : ' 3.x'
21+ - name : Install dependencies
22+ run : |
23+ python -m pip install --upgrade pip
24+ pip install setuptools wheel twine
25+ - name : Build and publish
26+ env :
27+ TWINE_USERNAME : ${{ secrets.PYPI_USERNAME }}
28+ TWINE_PASSWORD : ${{ secrets.PYPI_PASSWORD }}
29+ run : |
30+ python setup.py sdist bdist_wheel
31+ twine upload dist/*
Load Diff This file was deleted.
You can’t perform that action at this time.
0 commit comments