Skip to content

Commit

Permalink
Merge pull request #98 from xsnippet/pre-commit
Browse files Browse the repository at this point in the history
Add pre-commit-config.yaml
  • Loading branch information
ikalnytskyi committed Oct 8, 2019
2 parents 76b7b9c + 5546d9e commit c639934
Show file tree
Hide file tree
Showing 3 changed files with 26 additions and 7 deletions.
15 changes: 15 additions & 0 deletions .pre-commit-config.yaml
@@ -0,0 +1,15 @@
repos:
- repo: https://github.com/pre-commit/pre-commit-hooks
rev: v2.3.0
hooks:
- id: check-byte-order-marker
- id: check-merge-conflict
- id: check-case-conflict
- id: debug-statements
- id: end-of-file-fixer
- id: trailing-whitespace

- repo: https://gitlab.com/pycqa/flake8
rev: 3.7.7
hooks:
- id: flake8
11 changes: 5 additions & 6 deletions .travis.yml
@@ -1,13 +1,12 @@
language: python
python: 3.7

matrix:
include:
- python: 3.7
env: TOXENV=py37
- python: 3.7
env: TOXENV=openapi
- python: 3.7
env: TOXENV=docs
- env: TOXENV=pre-commit
- env: TOXENV=py37
- env: TOXENV=openapi
- env: TOXENV=docs

services:
- docker
Expand Down
7 changes: 6 additions & 1 deletion tox.ini
Expand Up @@ -9,9 +9,14 @@ deps =
flake8
commands =
{envpython} setup.py check --strict
{envpython} -m flake8 {posargs:.}
{envpython} -m pytest {posargs:.} --cov --cov-append --strict

[testenv:pre-commit]
skip_install = true
deps = pre-commit
commands =
pre-commit run --all-files --show-diff-on-failure

[testenv:openapi]
basepython = python3
deps = flex
Expand Down

0 comments on commit c639934

Please sign in to comment.