-
Notifications
You must be signed in to change notification settings - Fork 16
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
feat: adds a smoke test pipeline for specific component
- Loading branch information
Showing
9 changed files
with
125 additions
and
25 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,53 @@ | ||
run-name: Components - Build ${{ inputs.components }} | ||
name: Build and Run Tests | ||
|
||
on: | ||
workflow_dispatch: | ||
inputs: | ||
source_reference: | ||
description: | | ||
Branch from wazuh/wazuh-agent repository to use. | ||
required: true | ||
components: | ||
description: 'Select agent components/s to tested' | ||
required: true | ||
type: choice | ||
- agent_info | ||
- communicator | ||
- configuration_parser | ||
- multitype_queue | ||
- sqlite_manager | ||
|
||
workflow_call: | ||
inputs: | ||
source_reference: | ||
type: string | ||
required: true | ||
components: | ||
type: string | ||
required: true | ||
|
||
jobs: | ||
compile: | ||
runs-on: ubuntu-latest | ||
|
||
steps: | ||
- name: Checkout wazuh/wazuh-agent repository | ||
uses: actions/checkout@v4 | ||
with: | ||
repository: wazuh/wazuh-agent | ||
ref: ${{ inputs.source_reference }} | ||
|
||
|
||
- name: Build component | ||
run: | | ||
ls | ||
cd src/agent/${{ inputs.components }} | ||
mkdir build && cd build | ||
cmake .. -DBUILD_TESTS=ON | ||
make | ||
- name: Run the tests | ||
run: | | ||
cd src/agent/${{ inputs.components }}/build && ctest -V | ||
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,8 @@ | ||
{ | ||
"name": "wazuh-agent-mvp", | ||
"version": "5.0.0", | ||
"dependencies": [ | ||
"boost-uuid", | ||
"sqlitecpp" | ||
] | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,12 @@ | ||
{ | ||
"name": "wazuh-agent-mvp", | ||
"version": "5.0.0", | ||
"dependencies": [ | ||
"boost-asio", | ||
"gtest", | ||
"boost-beast", | ||
"jwt-cpp", | ||
"nlohmann-json", | ||
"openssl" | ||
] | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,11 @@ | ||
{ | ||
"name": "wazuh-agent-mvp", | ||
"version": "5.0.0", | ||
"dependencies": [ | ||
"boost-asio", | ||
"gtest", | ||
"fmt", | ||
"nlohmann-json", | ||
"sqlitecpp" | ||
] | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,22 +1,26 @@ | ||
cmake_minimum_required(VERSION 3.22) | ||
|
||
set(CMAKE_TOOLCHAIN_FILE "${CMAKE_SOURCE_DIR}/../../vcpkg/scripts/buildsystems/vcpkg.cmake") | ||
set(VCPKG_MANIFEST_DIR ${CMAKE_SOURCE_DIR}/../../) | ||
|
||
project(SQLiteManager) | ||
|
||
include(../../cmake/CommonSettings.cmake) | ||
set_common_settings() | ||
|
||
find_package(fmt REQUIRED) | ||
find_package(SQLiteCpp REQUIRED) | ||
|
||
add_library(SQLiteManager src/sqlite_manager.cpp) | ||
configure_target(SQLiteManager) | ||
target_include_directories(SQLiteManager PUBLIC ${CMAKE_CURRENT_SOURCE_DIR}/include PRIVATE ${SQLiteCpp_INCLUDE_DIRS}) | ||
target_link_libraries(SQLiteManager PUBLIC SQLiteCpp PRIVATE fmt::fmt) | ||
|
||
if(BUILD_TESTS) | ||
enable_testing() | ||
add_subdirectory(tests) | ||
endif() | ||
cmake_minimum_required(VERSION 3.22) | ||
|
||
set(CMAKE_TOOLCHAIN_FILE "${CMAKE_SOURCE_DIR}/../../vcpkg/scripts/buildsystems/vcpkg.cmake") | ||
set(VCPKG_MANIFEST_DIR ${CMAKE_CURRENT_SOURCE_DIR}/) | ||
|
||
project(SQLiteManager) | ||
|
||
include(../../cmake/CommonSettings.cmake) | ||
set_common_settings() | ||
|
||
|
||
find_package(fmt REQUIRED) | ||
find_package(SQLiteCpp REQUIRED) | ||
|
||
add_library(SQLiteManager src/sqlite_manager.cpp) | ||
|
||
include(../../cmake/ConfigureTarget.cmake) | ||
configure_target(SQLiteManager) | ||
|
||
target_include_directories(SQLiteManager PUBLIC ${CMAKE_CURRENT_SOURCE_DIR}/include PRIVATE ${SQLiteCpp_INCLUDE_DIRS}) | ||
target_link_libraries(SQLiteManager PUBLIC SQLiteCpp PRIVATE fmt::fmt) | ||
|
||
if(BUILD_TESTS) | ||
enable_testing() | ||
add_subdirectory(tests) | ||
endif() |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,11 @@ | ||
{ | ||
"name": "wazuh-agent-mvp", | ||
"version": "5.0.0", | ||
"dependencies": [ | ||
"boost-asio", | ||
"gtest", | ||
"fmt", | ||
"nlohmann-json", | ||
"sqlitecpp" | ||
] | ||
} |