Add tox jobs
This change adds tox jobs that lint and test python code. Together with the job definition and configuration, this change adds some dummy directories and tests that should be replaced once the actual code for this repo is migrated. Change-Id: Iaa201562faf2dbee0647b3366d6d0c5ece0561d0
This commit is contained in:
parent
658d4a347b
commit
05acd5e750
0
powertrain_build/__init__.py
Normal file
0
powertrain_build/__init__.py
Normal file
2
test-requirements.txt
Normal file
2
test-requirements.txt
Normal file
@ -0,0 +1,2 @@
|
||||
pytest
|
||||
flake8
|
0
tests/__init__.py
Normal file
0
tests/__init__.py
Normal file
2
tests/test_dummy.py
Normal file
2
tests/test_dummy.py
Normal file
@ -0,0 +1,2 @@
|
||||
def test_dummy():
|
||||
assert 1 == 1
|
25
tox.ini
Normal file
25
tox.ini
Normal file
@ -0,0 +1,25 @@
|
||||
[tox]
|
||||
skipsdist = True
|
||||
requires =
|
||||
tox >= 2.0
|
||||
|
||||
[flake8]
|
||||
exclude =
|
||||
.git,
|
||||
__pycache__,
|
||||
*.pyc,
|
||||
.cache,
|
||||
.tox
|
||||
max-line-length = 120
|
||||
|
||||
[testenv]
|
||||
platform = linux
|
||||
basepython = python3
|
||||
deps =
|
||||
-rtest-requirements.txt
|
||||
|
||||
[testenv:flake8]
|
||||
commands = flake8 powertrain_build tests
|
||||
|
||||
[testenv:pytest]
|
||||
commands = python -m pytest tests
|
@ -1,7 +1,9 @@
|
||||
- project:
|
||||
check:
|
||||
jobs:
|
||||
- powertrain-build-tox
|
||||
- noop
|
||||
gate:
|
||||
jobs:
|
||||
- powertrain-build-tox
|
||||
- noop
|
||||
|
5
zuul.d/tox.yaml
Normal file
5
zuul.d/tox.yaml
Normal file
@ -0,0 +1,5 @@
|
||||
- job:
|
||||
name: powertrain-build-tox
|
||||
parent: tox
|
||||
vars:
|
||||
tox_envlist: flake8,pytest
|
Loading…
Reference in New Issue
Block a user