Skip to content

Commit

Permalink
Merge pull request #49 from nokia/master
Browse files Browse the repository at this point in the history
added PyPI publishing automation, upgraded lxml version
  • Loading branch information
JonLundstrom authored Dec 13, 2021
2 parents 084a367 + b4fa55b commit 011a30e
Show file tree
Hide file tree
Showing 3 changed files with 31 additions and 5 deletions.
4 changes: 2 additions & 2 deletions .github/workflows/napalm-sros-ci.yml
Original file line number Diff line number Diff line change
Expand Up @@ -22,9 +22,9 @@ jobs:
- name: Lint with flake8
run: |
# stop the build if there are Python syntax errors or undefined names
flake8 . --count --select=E9,F63,F7,F82 --show-source --statistics
flake8 . --exclude .github,__pycache__,build,dist --count --select=E9,F63,F7,F82 --show-source --statistics
# exit-zero treats all errors as warnings. The GitHub editor is 127 chars wide
flake8 . --count --exit-zero --max-complexity=10 --max-line-length=127 --statistics
flake8 . --exclude .github,__pycache__,build,dist --count --exit-zero --max-complexity=10 --max-line-length=127 --statistics
- name: Test with pytest
run: |
pytest
Expand Down
26 changes: 26 additions & 0 deletions .github/workflows/publish_to_pypi.py
Original file line number Diff line number Diff line change
@@ -0,0 +1,26 @@
name: Publish release to PyPI

on:
release:
types: [published]

jobs:
deploy:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v2
- name: Set up Python
uses: actions/setup-python@v2
with:
python-version: '3.x'
- name: Install dependencies
run: |
python -m pip install --upgrade pip
pip install build
- name: Build package
run: python -m build
- name: Publish package
uses: pypa/gh-action-pypi-publish@27b31702a0e7fc50959f5ad993c78deac1bdfc29
with:
user: __token__
password: ${{ secrets.PYPI_API_TOKEN }}
6 changes: 3 additions & 3 deletions setup.py
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,7 @@

setup(
name="napalm-sros",
version="1.0.0",
version="1.0.1",
packages=find_packages(),
author="Nokia",
author_email="",
Expand All @@ -23,7 +23,7 @@
"pytest>=5.4.3",
"textfsm>=1.1.0",
"paramiko>=2.7.1",
"lxml>=4.6.2",
"lxml>=4.6.4",
"ncclient>=0.6.7",
"xmltodict>=0.12.0",
"dictdiffer>=0.9.0",
Expand All @@ -32,4 +32,4 @@
python_requires=">=3.6",
long_description=long_description,
long_description_content_type="text/markdown",
)
)

0 comments on commit 011a30e

Please sign in to comment.