diff --git a/.github/workflows/ros2_ci.yml b/.github/workflows/ros2_ci.yml index ab508a1..b5b7762 100644 --- a/.github/workflows/ros2_ci.yml +++ b/.github/workflows/ros2_ci.yml @@ -54,10 +54,8 @@ jobs: colcon build --symlink-install shell: bash - - name: Run tests + - name: Run unittest tests run: | cd robile_safety - source /opt/ros/humble/setup.bash - colcon test - colcon test-result --verbose + python3 -m unittest discover test shell: bash diff --git a/pytest.ini b/pytest.ini new file mode 100644 index 0000000..aa6ab96 --- /dev/null +++ b/pytest.ini @@ -0,0 +1,5 @@ +[pytest] +addopts = --ignore=test +python_files = *.py +python_classes = *Test +python_functions = test_* diff --git a/setup.cfg b/setup.cfg index 714aabe..a23d309 100644 --- a/setup.cfg +++ b/setup.cfg @@ -2,3 +2,5 @@ script_dir=$base/lib/robile_safety [install] install_scripts=$base/lib/robile_safety +[tool:pytest] +testpaths = test