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:
Alberto Gonzalez 2024-04-26 10:38:50 +02:00
parent 658d4a347b
commit 05acd5e750
7 changed files with 36 additions and 0 deletions

View File

2
test-requirements.txt Normal file
View File

@ -0,0 +1,2 @@
pytest
flake8

0
tests/__init__.py Normal file
View File

2
tests/test_dummy.py Normal file
View File

@ -0,0 +1,2 @@
def test_dummy():
assert 1 == 1

25
tox.ini Normal file
View 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

View File

@ -1,7 +1,9 @@
- project:
check:
jobs:
- powertrain-build-tox
- noop
gate:
jobs:
- powertrain-build-tox
- noop

5
zuul.d/tox.yaml Normal file
View File

@ -0,0 +1,5 @@
- job:
name: powertrain-build-tox
parent: tox
vars:
tox_envlist: flake8,pytest