[pull] main from wazuh:main #88
This file contains hidden or 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
name: Wazuh Keystore | |
on: | |
workflow_dispatch: | |
pull_request: | |
# Pull request events | |
types: [synchronize, opened, reopened, ready_for_review] | |
# Path filtering | |
paths: | |
- ".github/workflows/wazuh-keystore-tests.yml" | |
- "src/engine/source/keystore/**" | |
- "src/engine/source/base/include/base/utils/**" | |
# Ensures only one instance of this workflow is running per PR | |
concurrency: | |
group: ${{ github.workflow }}-${{ github.ref }} | |
env: | |
BUILD_PRESET: release | |
# Relative path from ${{github.workspace}} | |
ENGINE_PATH: src/engine | |
jobs: | |
wazuh-keystore-qa: | |
runs-on: ubuntu-22.04 | |
steps: | |
- name: Checkout repository | |
uses: actions/checkout@v3 | |
with: | |
submodules: recursive | |
- name: Install dependencies (lzip) | |
run: sudo apt-get install lzip | |
- name: Setup VCPKG | |
uses: lukka/run-vcpkg@v11 | |
with: | |
vcpkgDirectory: '${{env.ENGINE_PATH}}/vcpkg' | |
vcpkgGitCommitId: 'a42af01b72c28a8e1d7b48107b33e4f286a55ef6' | |
vcpkgJsonGlob: '${{env.ENGINE_PATH}}/vcpkg.json' | |
- name: Configure CMake | |
run: cmake --preset=${{env.BUILD_PRESET}} --no-warn-unused-cli -S ${{env.ENGINE_PATH}} -DENGINE_BUILD_BENCHMARK=OFF -DENGINE_BUILD_DOCUMENTATION=OFF | |
- name: Build | |
run: cmake --build ${{env.ENGINE_PATH}}/build --target wazuh-keystore wazuh-keystore_tool -j$(nproc) | |
- name: Install dependencies | |
run: | | |
pip install -r src/engine/source/keystore/qa/requirements.txt | |
- name: Run tests | |
run: | | |
find ./ -name "wazuh-keystore_tool" -exec cp {} src/engine/source/keystore/qa/ \; | |
find ./ -name "wazuh-keystore" -exec cp {} src/engine/source/keystore/qa/ \; | |
cd src/engine/source/keystore/qa/ | |
python -m pytest -vv ./ --log-cli-level=DEBUG |