test harness changes
- update badge on README.rst - update to tox.ini - update pre-commit configurationpull/1/head
parent
adbcd80a1d
commit
e980b5d9e6
|
@ -1,17 +1,25 @@
|
||||||
repos:
|
repos:
|
||||||
- repo: https://github.com/pre-commit/pre-commit-hooks
|
- repo: https://github.com/pre-commit/pre-commit-hooks
|
||||||
rev: v1.3.0
|
rev: v3.4.0
|
||||||
hooks:
|
hooks:
|
||||||
- id: trailing-whitespace
|
- id: trailing-whitespace
|
||||||
- id: flake8
|
|
||||||
args:
|
|
||||||
- --max-line-length=160
|
|
||||||
- id: check-merge-conflict
|
- id: check-merge-conflict
|
||||||
- repo: https://github.com/asottile/add-trailing-comma
|
- repo: https://github.com/asottile/add-trailing-comma
|
||||||
rev: v0.6.4
|
rev: v0.6.4
|
||||||
hooks:
|
hooks:
|
||||||
- id: add-trailing-comma
|
- id: add-trailing-comma
|
||||||
- repo: https://github.com/FalconSocial/pre-commit-python-sorter
|
- repo: https://github.com/PyCQA/flake8
|
||||||
sha: b57843b0b874df1d16eb0bef00b868792cb245c2
|
rev: 3.8.4
|
||||||
hooks:
|
hooks:
|
||||||
- id: python-import-sorter
|
- id: flake8
|
||||||
|
name: Check project styling
|
||||||
|
args:
|
||||||
|
- --max-line-length=160
|
||||||
|
- repo: https://github.com/PyCQA/isort
|
||||||
|
rev: 5.7.0
|
||||||
|
hooks:
|
||||||
|
- id: isort
|
||||||
|
name: Sort python imports (shows diff)
|
||||||
|
args: ["-c", "--diff"]
|
||||||
|
- id: isort
|
||||||
|
name: Sort python imports (fixes files)
|
||||||
|
|
|
@ -163,8 +163,8 @@ questions about TC Open Repository participation to OASIS Staff at
|
||||||
repository-admin@oasis-open.org and any specific CLA-related questions
|
repository-admin@oasis-open.org and any specific CLA-related questions
|
||||||
to repository-cla@oasis-open.org.
|
to repository-cla@oasis-open.org.
|
||||||
|
|
||||||
.. |Build_Status| image:: https://travis-ci.org/oasis-open/cti-python-stix2.svg?branch=master
|
.. |Build_Status| image:: https://github.com/oasis-open/cti-python-stix2/workflows/cti-python-stix2%20test%20harness/badge.svg
|
||||||
:target: https://travis-ci.org/oasis-open/cti-python-stix2
|
:target: https://github.com/oasis-open/cti-python-stix2/actions?query=workflow%3A%22cti-python-stix2+test+harness%22
|
||||||
:alt: Build Status
|
:alt: Build Status
|
||||||
.. |Coverage| image:: https://codecov.io/gh/oasis-open/cti-python-stix2/branch/master/graph/badge.svg
|
.. |Coverage| image:: https://codecov.io/gh/oasis-open/cti-python-stix2/branch/master/graph/badge.svg
|
||||||
:target: https://codecov.io/gh/oasis-open/cti-python-stix2
|
:target: https://codecov.io/gh/oasis-open/cti-python-stix2
|
||||||
|
|
31
tox.ini
31
tox.ini
|
@ -1,5 +1,5 @@
|
||||||
[tox]
|
[tox]
|
||||||
envlist = py35,py36,py37,py38,style,isort-check,packaging
|
envlist = py35,py36,py37,py38,packaging,pre-commit-check
|
||||||
|
|
||||||
[testenv]
|
[testenv]
|
||||||
deps =
|
deps =
|
||||||
|
@ -15,33 +15,24 @@ deps =
|
||||||
commands =
|
commands =
|
||||||
python -m pytest --cov=stix2 stix2/test/ --cov-report term-missing -W ignore::stix2.exceptions.STIXDeprecationWarning
|
python -m pytest --cov=stix2 stix2/test/ --cov-report term-missing -W ignore::stix2.exceptions.STIXDeprecationWarning
|
||||||
|
|
||||||
passenv = CI TRAVIS TRAVIS_*
|
passenv = GITHUB_*
|
||||||
|
|
||||||
[testenv:style]
|
|
||||||
deps =
|
|
||||||
flake8
|
|
||||||
commands =
|
|
||||||
flake8
|
|
||||||
|
|
||||||
[flake8]
|
|
||||||
max-line-length = 160
|
|
||||||
|
|
||||||
[testenv:isort-check]
|
|
||||||
deps = isort
|
|
||||||
commands =
|
|
||||||
isort stix2 examples --df
|
|
||||||
isort stix2 examples -c
|
|
||||||
|
|
||||||
[testenv:packaging]
|
[testenv:packaging]
|
||||||
deps =
|
deps =
|
||||||
twine
|
twine
|
||||||
commands =
|
commands =
|
||||||
python setup.py bdist_wheel --universal
|
python setup.py sdist bdist_wheel --universal
|
||||||
twine check dist/*
|
twine check dist/*
|
||||||
|
|
||||||
[travis]
|
[testenv:pre-commit-check]
|
||||||
|
deps =
|
||||||
|
pre-commit
|
||||||
|
commands =
|
||||||
|
pre-commit run --all-files
|
||||||
|
|
||||||
|
[gh-actions]
|
||||||
python =
|
python =
|
||||||
3.5: py35
|
3.5: py35
|
||||||
3.6: py36
|
3.6: py36
|
||||||
3.7: py37
|
3.7: py37
|
||||||
3.8: py38, style, packaging
|
3.8: py38, packaging, pre-commit-check
|
||||||
|
|
Loading…
Reference in New Issue