From 5bcb4cfdd318a923fef7bf1478dd02edd44af8d3 Mon Sep 17 00:00:00 2001 From: light7734 Date: Wed, 16 Jul 2025 11:03:42 +0330 Subject: [PATCH] ci: add unit testing to drone-ci --- .drone.yml | 48 +++++++++++++++++++++++++++++++++++++++++++++--- 1 file changed, 45 insertions(+), 3 deletions(-) diff --git a/.drone.yml b/.drone.yml index 8474519..c98ed16 100644 --- a/.drone.yml +++ b/.drone.yml @@ -32,8 +32,43 @@ steps: fi exit ${has_fomatting_issues} ---- +--- +kind: pipeline +type: docker +name: unit tests +clone: + recursive: true + submodule_update_remote: true + +trigger: + branch: + - main + +steps: +- name: unit tests + image: unit_tests:latest + pull: if-not-exists + commands: + - | + git submodule update --init --recursive + + conan build . \ + -c tools.system.package_manager:mode=install \ + -s build_type=Release \ + -o enable_static_analysis=False \ + -o enable_tests=True \ + --build=missing + + find ./build \ + -type f \ + -name '*_tests' \ + -executable \ + -exec sh -c \ + '{}' \ + \; + +--- kind: pipeline type: docker name: static analysis @@ -51,5 +86,12 @@ steps: pull: if-not-exists privileged: true commands: - - git submodule update --init --recursive - - conan build . -s build_type=Release -o enable_static_analysis=True --build=missing + - | + git submodule update --init --recursive + + conan build . \ + -c tools.system.package_manager:mode=install \ + -s build_type=Release \ + -o enable_static_analysis=True \ + -o enable_tests=True \ + --build=missing