Skip to content

Commit

Permalink
move ci to github action
Browse files Browse the repository at this point in the history
  • Loading branch information
digitronik committed Jan 1, 2020
1 parent 1958bbe commit 3ef2d10
Show file tree
Hide file tree
Showing 3 changed files with 71 additions and 50 deletions.
52 changes: 52 additions & 0 deletions .github/workflows/unit_checks.yml
Original file line number Diff line number Diff line change
@@ -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
42 changes: 19 additions & 23 deletions .pre-commit-config.yaml
Original file line number Diff line number Diff line change
@@ -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
27 changes: 0 additions & 27 deletions .travis.yml

This file was deleted.

0 comments on commit 3ef2d10

Please sign in to comment.