diff --git a/.github/workflows/unit_checks.yml b/.github/workflows/unit_checks.yml new file mode 100644 index 0000000..1d78347 --- /dev/null +++ b/.github/workflows/unit_checks.yml @@ -0,0 +1,52 @@ +name: miqsel + +on: [push, pull_request] + +jobs: + pre-commit: + name: Pre-Commit Checks + runs-on: ubuntu-latest + steps: + - name: Checkout to master + uses: actions/checkout@master + + - name: Setup python + uses: actions/setup-python@v1 + with: + python-version: '3.7' + architecture: 'x64' + + - name: Pre-Commit Checks + run: | + python -m pip install pre-commit + pre-commit run -a + + - name: Analysis (git diff) + if: failure() + run: git diff + + tests: + name: Test-Py${{ matrix.python-version }} + needs: pre-commit + runs-on: ubuntu-latest + strategy: + matrix: + python-version: [ '3.6', '3.7' ] + steps: + - name: Checkout to master + uses: actions/checkout@master + + - name: Setup Python-${{ matrix.python-version }} + uses: actions/setup-python@v1 + with: + python-version: ${{ matrix.python-version }} + architecture: x64 + + - name: Setup Package and Install Devel Dependancies + run: | + python -m pip install . + + - name: Unit Tests + run: | + python -m pip install pytest + py.test tests -v diff --git a/.pre-commit-config.yaml b/.pre-commit-config.yaml index e46f488..c835131 100644 --- a/.pre-commit-config.yaml +++ b/.pre-commit-config.yaml @@ -1,38 +1,34 @@ repos: -- repo: https://github.com/pre-commit/pre-commit-hooks - rev: v2.4.0 - hooks: - - id: trailing-whitespace - name: Trim Trailing Whitespace - language_version: python3 - - id: end-of-file-fixer - name: File Ending - language_version: python3 - - id: debug-statements - name: Debug Statments - language_version: python3 - - id: flake8 - name: Flake8 - language_version: python3 - verbose: true - - id: check-yaml - repo: https://github.com/asottile/reorder_python_imports - rev: v1.8.0 + rev: v1.6.1 hooks: - id: reorder-python-imports - name: Reorder Python Imports language_version: python3 - repo: https://github.com/psf/black - rev: 19.10b0 + rev: 19.3b0 hooks: - id: black - name: Formate with Black args: [--safe, --quiet, --line-length, "100"] language_version: python3 require_serial: true +- repo: https://github.com/pre-commit/pre-commit-hooks + rev: v2.2.3 + hooks: + - id: flake8 + verbose: true +- repo: https://github.com/pre-commit/pre-commit-hooks + rev: v2.3.0 + hooks: + - id: trailing-whitespace + language_version: python3 + - id: end-of-file-fixer + language_version: python3 + - id: debug-statements + language_version: python3 + - id: flake8 + language_version: python3 - repo: https://github.com/asottile/pyupgrade - rev: v1.25.2 + rev: v1.22.1 hooks: - id: pyupgrade - name: Python Package Checks language_version: python3 diff --git a/.travis.yml b/.travis.yml deleted file mode 100644 index 0cee654..0000000 --- a/.travis.yml +++ /dev/null @@ -1,27 +0,0 @@ -language: python -dist: xenial -sudo: required -services: -- docker -python: -- '3.6' -- '3.7' -install: -- pip install black flake8 pytest pytest-cov -- pip install . -script: -- flake8 --max-line-length 100 setup.py miqsel/*.py tests/*.py -- black -l 100 setup.py miqsel/*.py tests/*.py -- pytest tests -v --cov miqsel -after_failure: -- git diff -deploy: - provider: pypi - user: digitronik - password: - secure: hekDkucV034/iIvY/kXqS9xvqDKrKqY6ROKJWNfrpFpWt1xRT+zPhsNLVIA2WUbaLnRwL2FkxBOxibnVlBXBaRl9oukB4EQoXsMbK4efn7KxwVP9DimD8J7/XQyq5APh9PRdfOvnnfwt8HutllmwhttpVcEZlMAdtJWWXaxEyUqrwXjRUJIh6fXFCan/82lelNtQbJKcD41C11fGvMSzvvBhHcaMqwQYOFeXyTfsVVl51Nypnb6EQA/JFFEqN8DHDl6t9nWd9kI29bOoiDHDIS9T67MkuK2yLdBWHQAedC8n2oO2Uc2/NoiQkME6FlzmRfiFMp5pOw99WkKCdpwwUG5n4sVqmOLQ6H3d40sHXyjp0G4tyN9J37TPkjPSIWH9F+AqVQHkpxn0Mewb590cLOySAC1zph04tqbD4VQDIK/EsKFYzT6AhKxaOIHECz0Q1pef93CyULkQ6WWqBKABcuEHmm23GVQ54J8YyZRmdrNDBdZ3lkHekuiifkP0m2NwTQvC16Z9XpV59YJK6/VodxQKk6th0X8fIBRVcehKKnLIO6Umps5eViQYrktjV96FFuy/6C9VR69F5ccgGs5jWBUwDqvWnd0TrwPJB5euaeTMKVDFnhueEQ5tchf2nolCLDKpvxp5qMt6Pjk/mWJU89UnilkZzIvqF++RT6rKQvc= - on: - tags: true - python: 3.7 - distributions: sdist bdist_wheel - repo: digitronik/miqsel