Skip to content

Merge pull request #98 from Laguna1989/dependabot/github_actions/mymi… #68

Merge pull request #98 from Laguna1989/dependabot/github_actions/mymi…

Merge pull request #98 from Laguna1989/dependabot/github_actions/mymi… #68

Workflow file for this run

name: Code Coverage
on:
push:
branches: [ master ]
pull_request:
branches: [ master ]
jobs:
run:
runs-on: windows-2022
name: Code Coverage Report
steps:
- name: Set up cmake
uses: jwlawson/[email protected]
with:
cmake-version: '3.19.x'
- name: Enable Developer Command Prompt
uses: ilammy/[email protected]
- uses: actions/[email protected]
with:
lfs: true
- name: CMake
run: cmake -B ${{github.workspace}}/build . -DOALPP_STATIC_LIBRARY=ON -DOALPP_ENABLE_APPROVAL_TESTS=OFF -DOALPP_ENABLE_INTEGRATION_TESTS=OFF
- name: Build
working-directory: ${{github.workspace}}/build
run: cmake --build .
- run: net start audiosrv
- name: Setup virtual soundcard
uses: LABSN/[email protected]
- name: Setup OpenCppCoverage and add to PATH
id: setup_opencppcoverage
run: |
choco install OpenCppCoverage -y
echo "C:\Program Files\OpenCppCoverage" >> $env:GITHUB_PATH
- name: Generate Report
id: generate_test_report
working-directory: ${{github.workspace}}/build/test/unit_tests
shell: cmd
run: OpenCppCoverage.exe --export_type cobertura:${{github.workspace}}/build/OpenALppCoverage.xml --sources ${{github.workspace}}\impl --excluded_sources ${{github.workspace}}\build\test\ --excluded_sources ${{github.workspace}}\build\ext\* --excluded_sources ${{github.workspace}}\build ${{github.workspace}}\build\test\unit_tests\OpenALpp_UnitTests.exe
- name: Upload Report to Codecov
uses: codecov/codecov-action@v2
with:
working-directory: ${{github.workspace}}/build
files: ./OpenALppCoverage.xml
fail_ci_if_error: true
functionalities: fix