Skip to content

Commit

Permalink
Migrate from 'Travis CI' to 'GitHub Actions' (...)
Browse files Browse the repository at this point in the history
Made corrections for pylint upgrade:

 pylint --rcfile=./.pylintrc --reports=y --output-format=text nistbeacon
************* Module nistbeacon.nistbeacon
nistbeacon/nistbeacon.py:23:0: R0205: Class 'NistBeacon' inherits from object, can be safely removed from bases in python3 (useless-object-inheritance)
nistbeacon/nistbeacon.py:69:12: R1705: Unnecessary "else" after "return" (no-else-return)
nistbeacon/nistbeacon.py:80:4: R1710: Either all return statements in a function should return an expression, or none of them should. (inconsistent-return-statements)
nistbeacon/nistbeacon.py:160:8: R1705: Unnecessary "else" after "return" (no-else-return)
************* Module nistbeacon.nistbeaconvalue
nistbeacon/nistbeaconvalue.py:26:0: R0205: Class 'NistBeaconValue' inherits from object, can be safely removed from bases in python3 (useless-object-inheritance)
************* Module nistbeacon.nistbeaconcrypto
nistbeacon/nistbeaconcrypto.py:26:0: R0205: Class 'NistBeaconCrypto' inherits from object, can be safely removed from bases in python3 (useless-object-inheritance)
nistbeacon/nistbeaconcrypto.py:186:21: R1719: The if expression can be replaced with 'test' (simplifiable-if-expression)
  • Loading branch information
urda committed Nov 8, 2020
1 parent 43e0c3d commit b8d9863
Show file tree
Hide file tree
Showing 16 changed files with 470 additions and 179 deletions.
Empty file removed .codecov.yml
Empty file.
6 changes: 6 additions & 0 deletions .github/codecov.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,6 @@
coverage:
status:
patch:
default:
enabled: yes
target: 100%
60 changes: 60 additions & 0 deletions .github/workflows/linting.yaml
Original file line number Diff line number Diff line change
@@ -0,0 +1,60 @@
name: Linting Checks


on:
pull_request:
branches:
- master


jobs:
linting-checks:
runs-on: ubuntu-latest

strategy:
matrix:
python-version:
- 3.8

steps:
- uses: actions/checkout@v2

- name: Set up Python ${{ matrix.python-version }}
uses: actions/setup-python@v2
with:
python-version: ${{ matrix.python-version }}

- name: Install dependencies
run: |
python -m pip install --upgrade pip wheel
pip install -r requirements-test.txt
- name: Pep8 Check
run: make pep8

- name: Pylint Check
run: make pylint

version-check:
runs-on: ubuntu-latest

strategy:
matrix:
python-version:
- 3.8

steps:
- uses: actions/checkout@v2

- name: Set up Python ${{ matrix.python-version }}
uses: actions/setup-python@v2
with:
python-version: ${{ matrix.python-version }}

- name: Install dependencies
run: |
python -m pip install --upgrade pip wheel
pip install -r requirements-test.txt
- name: Version Check
run: make version-check
53 changes: 53 additions & 0 deletions .github/workflows/package-building.yaml
Original file line number Diff line number Diff line change
@@ -0,0 +1,53 @@
name: Package Building


on:
push:
branches:
- master


jobs:
build-beta:
runs-on: ubuntu-latest

strategy:
matrix:
python-version:
- 3.8

steps:
- uses: actions/checkout@v2

- name: Set up Python ${{ matrix.python-version }}
uses: actions/setup-python@v2
with:
python-version: ${{ matrix.python-version }}

- name: Install dependencies
run: |
python -m pip install --upgrade pip wheel
pip install -r requirements-test.txt
- name: Build beta packages
run: make build-beta

- name: Archive beta package
uses: actions/upload-artifact@v2
with:
name: python-package-nistbeacon-tar-ball.tar.gz
path: beta_dist/nistbeacon-*.tar.gz
if-no-files-found: error
retention-days: 90

- name: Archive beta python wheel
uses: actions/upload-artifact@v2
with:
name: python-package-nistbeacon-wheel.whl
path: beta_dist/nistbeacon-*.whl
if-no-files-found: error
retention-days: 90

- name: Show generated beta package names
shell: bash
run: ls -1a beta_dist/
45 changes: 45 additions & 0 deletions .github/workflows/pull-request-test.yaml
Original file line number Diff line number Diff line change
@@ -0,0 +1,45 @@
name: Pull Request Test


on:
pull_request:
branches:
- master


jobs:
pull-request-test:
runs-on: ubuntu-latest

strategy:
matrix:
python-version:
- 3.8

steps:
- uses: actions/checkout@v2

- name: Set up Python ${{ matrix.python-version }}
uses: actions/setup-python@v2
with:
python-version: ${{ matrix.python-version }}

- name: Environment Report
run: |
echo Python Version ... $(python --version)
- name: Install dependencies
run: |
python -m pip install --upgrade pip wheel
pip install -r requirements-test.txt
- name: Unit Testing
run: make unittest

- name: Local Integration Testing
run: make integration

- name: Upload Coverage Report
uses: codecov/codecov-action@v1
with:
fail_ci_if_error: true
47 changes: 47 additions & 0 deletions .github/workflows/testing.yaml
Original file line number Diff line number Diff line change
@@ -0,0 +1,47 @@
name: Comprehensive Testing


on:
pull_request:
branches:
- master


jobs:
testing:
runs-on: ubuntu-latest

strategy:
matrix:
python-version:
- 3.8
- 3.7
- 3.6

steps:
- uses: actions/checkout@v2

- name: Set up Python ${{ matrix.python-version }}
uses: actions/setup-python@v2
with:
python-version: ${{ matrix.python-version }}

- name: Environment Report
run: |
echo Python Version ... $(python --version)
- name: Install dependencies
run: |
python -m pip install --upgrade pip wheel
pip install -r requirements-test.txt
- name: Unit Testing
run: make unittest

- name: Local Integration Testing
run: make integration

- name: Upload Coverage Report
uses: codecov/codecov-action@v1
with:
fail_ci_if_error: true
9 changes: 7 additions & 2 deletions .gitignore
Original file line number Diff line number Diff line change
@@ -1,16 +1,21 @@
### Python ###
__pycache__/
*.py[cod]

# Packaging
dist/
MANIFEST

*.egg-info/
build/
dist/
beta_dist/

# Sphinx
sphinx/_build

# Testing
.coverage

.cache/
.tox/
htmlcov/

57 changes: 0 additions & 57 deletions .travis.yml

This file was deleted.

Loading

0 comments on commit b8d9863

Please sign in to comment.