Skip to content

Commit

Permalink
Merge pull request #4 from scheibling/main
Browse files Browse the repository at this point in the history
Bugfixes, testing and linting
  • Loading branch information
scheibling authored Jun 1, 2022
2 parents 6f11627 + 5384107 commit 818cb91
Show file tree
Hide file tree
Showing 15 changed files with 3,004 additions and 812 deletions.
17 changes: 7 additions & 10 deletions .github/workflows/test_and_lint.yml
Original file line number Diff line number Diff line change
Expand Up @@ -16,17 +16,17 @@ jobs:
- name: Set up Python
uses: actions/setup-python@v2
with:
python-version: "3.10"
python-version: "3.9"

- name: Install dependencies
run: |
python -m pip install --upgrade pip
pip install -r requirements.txt
pip install pylint-report
pip install pylint pylint-report
- name: Run tests
run: |
pylint -f json src/sshkey_tools/ | pylint_report.py > report.html
pylint src/sshkey_tools/ | pylint_report.py > report.html
- name: Upload report
uses: actions/upload-artifact@v1
Expand All @@ -40,7 +40,6 @@ jobs:
fail-fast: false
matrix:
python-version:
- "3.6"
- "3.7"
- "3.8"
- "3.9"
Expand All @@ -60,15 +59,13 @@ jobs:
- name: Install dependencies
run: |
python -m pip install --upgrade pip
pip install -r requirements.txt
pip install coverage
pip install -r requirements-test.txt
- name: Run tests
run: |
python test.py
python -m coverage run test.py
python -m coverage report
python -m coverage html
coverage run -m unittest discover tests/
coverage report --omit="tests/*.py"
coverage html
- name: Upload report
uses: actions/upload-artifact@v1
Expand Down
5 changes: 4 additions & 1 deletion .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -142,4 +142,7 @@ test_dss*
test_ed25519*
test_flow.py
temptest.py
oldsrc/*
oldsrc/*
tempfolder
report.html
test_certificate
5 changes: 5 additions & 0 deletions .pylintrc
Original file line number Diff line number Diff line change
@@ -0,0 +1,5 @@
[MASTER]
load-plugins=pylint_report

[REPORTS]
output-format=pylint_report.CustomJsonReporter
9 changes: 9 additions & 0 deletions requirements-test.txt
Original file line number Diff line number Diff line change
@@ -0,0 +1,9 @@
click
cryptography
bcrypt
enum34
paramiko
coverage
black
pytest-cov
faker
14 changes: 7 additions & 7 deletions src/sshkey_tools/__version__.py
Original file line number Diff line number Diff line change
Expand Up @@ -2,19 +2,19 @@
import os

# The title and description of the package
__title__ = 'sshkey-tools'
__description__ = '''
__title__ = "sshkey-tools"
__description__ = """
A Python module for generating, parsing and handling OpenSSH keys and certificates
'''
"""

# The version and build number
# Without specifying a unique number, you cannot overwrite packages in the PyPi repo
__version__ = os.getenv('RELEASE_NAME', '0.0.1-dev' + os.getenv('GITHUB_RUN_ID') )
__version__ = os.getenv("RELEASE_NAME", "0.0.1-dev" + os.getenv("GITHUB_RUN_ID"))

# Author and license information
__author__ = 'Lars Scheibling'
__author_email__ = '[email protected]'
__license__ = 'GnuPG 3.0'
__author__ = "Lars Scheibling"
__author_email__ = "[email protected]"
__license__ = "GnuPG 3.0"

# URL to the project
__url__ = f"https://github.com/scheiblingco/{__title__}"
Loading

0 comments on commit 818cb91

Please sign in to comment.