Merge pull request #16 from BICEP-Pump/dev #31
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: Unit Tests | |
| on: | |
| push: | |
| jobs: | |
| test: | |
| runs-on: ubuntu-latest | |
| steps: | |
| - name: Checkout repository | |
| uses: actions/checkout@v3 | |
| - name: Install dependencies | |
| run: | | |
| sudo apt-get update | |
| sudo apt-get install -y build-essential cmake gcovr lcov | |
| - name: Configure and Build Tests | |
| run: | | |
| mkdir build && cd build | |
| cmake -DCMAKE_BUILD_TYPE=Debug -DBUILD_TESTS=ON .. | |
| make bicep_tests -j$(nproc) | |
| - name: Run Tests | |
| working-directory: build | |
| run: ./bicep_tests | |
| - name: Generate Coverage Report | |
| run: | | |
| gcovr -r . --xml-pretty -o coverage.xml --exclude 'tests/.*' | |
| - name: Upload to Codecov | |
| uses: codecov/codecov-action@v4 | |
| with: | |
| files: ./coverage.xml | |
| fail_ci_if_error: true | |
| token: ${{ secrets.CODECOV_TOKEN }} |