Skip to content

fix(ci): repair doc-audit workflow YAML and JS escaping #872

fix(ci): repair doc-audit workflow YAML and JS escaping

fix(ci): repair doc-audit workflow YAML and JS escaping #872

name: Integration Tests
on:
push:
branches: [ main, develop, feat/* ]
pull_request:
branches: [ main, develop ]
workflow_dispatch:
jobs:
integration-tests:
name: ${{ matrix.os }} - ${{ matrix.build_type }}
runs-on: ${{ matrix.os }}
strategy:
fail-fast: false
matrix:
os: [ubuntu-latest, macos-latest]
build_type: [Debug, Release]
include:
- os: ubuntu-latest
install_deps: |
# Add Kitware APT repository for latest CMake
sudo apt-get update
sudo apt-get install -y ca-certificates gpg wget
test -f /usr/share/doc/kitware-archive-keyring/copyright || wget -O - https://apt.kitware.com/keys/kitware-archive-latest.asc 2>/dev/null | gpg --dearmor - | sudo tee /usr/share/keyrings/kitware-archive-keyring.gpg >/dev/null
echo 'deb [signed-by=/usr/share/keyrings/kitware-archive-keyring.gpg] https://apt.kitware.com/ubuntu/ noble main' | sudo tee /etc/apt/sources.list.d/kitware.list >/dev/null
sudo apt-get update
sudo apt-get install -y cmake ninja-build lcov
cmake --version
- os: macos-latest
install_deps: |
brew install ninja lcov
steps:
- name: Checkout code
uses: actions/checkout@v6
with:
submodules: recursive
# Ecosystem dependencies checkout using actions/checkout@v6
- name: Checkout common_system
uses: actions/checkout@v6
with:
repository: kcenon/common_system
path: common_system
token: ${{ secrets.GITHUB_TOKEN }}
- name: Checkout thread_system
uses: actions/checkout@v6
with:
repository: kcenon/thread_system
path: thread_system
token: ${{ secrets.GITHUB_TOKEN }}
- name: Checkout logger_system
uses: actions/checkout@v6
with:
repository: kcenon/logger_system
path: logger_system
token: ${{ secrets.GITHUB_TOKEN }}
- name: Install dependencies
run: ${{ matrix.install_deps }}
- name: Install Google Test
run: |
git clone https://github.com/google/googletest.git -b release-1.12.1
cd googletest
mkdir build && cd build
cmake .. -DCMAKE_BUILD_TYPE=${{ matrix.build_type }}
sudo cmake --build . --target install
- name: Configure CMake
run: |
cmake -B build \
-DCMAKE_BUILD_TYPE=${{ matrix.build_type }} \
-DBUILD_EXAMPLES=OFF \
-DMONITORING_BUILD_INTEGRATION_TESTS=ON \
-DENABLE_COVERAGE=${{ matrix.build_type == 'Debug' && 'ON' || 'OFF' }}
- name: Build
run: cmake --build build --config ${{ matrix.build_type }} -j4
- name: Run Integration Tests
working-directory: build
run: ctest -C ${{ matrix.build_type }} --output-on-failure --verbose
- name: Generate Coverage Report
if: matrix.build_type == 'Debug'
working-directory: build
run: |
lcov --capture --directory . --output-file coverage.info --ignore-errors mismatch --ignore-errors inconsistent --ignore-errors negative --ignore-errors format --ignore-errors unsupported
lcov --remove coverage.info '/usr/*' '*/tests/*' '*/googletest/*' '*/common_system_install/*' '/Applications/Xcode*/**' '/usr/local/include/*' --output-file coverage_filtered.info --ignore-errors unused --ignore-errors inconsistent --ignore-errors format
lcov --list coverage_filtered.info --ignore-errors inconsistent
- name: Upload Coverage to Codecov
if: matrix.build_type == 'Debug'
continue-on-error: true
uses: codecov/codecov-action@v6
with:
files: build/coverage_filtered.info
flags: integration-tests
name: ${{ matrix.os }}-integration
fail_ci_if_error: false
- name: Generate Coverage HTML
if: matrix.build_type == 'Debug'
working-directory: build
run: |
genhtml coverage_filtered.info --output-directory coverage_html --ignore-errors source --ignore-errors inconsistent --ignore-errors category
- name: Upload Coverage HTML
if: matrix.build_type == 'Debug'
uses: actions/upload-artifact@v7
with:
name: coverage-report-${{ matrix.os }}
path: build/coverage_html
- name: Performance Baseline Validation
if: matrix.build_type == 'Release'
working-directory: build
run: |
./integration_tests/monitoring_integration_tests --gtest_filter="*Performance*" || true
- name: Upload Test Results
if: always()
uses: actions/upload-artifact@v7
with:
name: test-results-${{ matrix.os }}-${{ matrix.build_type }}
path: build/Testing/Temporary/
summary:
name: Integration Test Summary
runs-on: ubuntu-latest
needs: integration-tests
if: always()
steps:
- name: Summary
run: |
echo "Integration tests completed"
echo "Check individual job results for details"