Add caching of updated paths #1079
Workflow file for this run
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
name: Run tests on Ubuntu | |
on: | |
push: | |
branches: [ "main" ] | |
pull_request: | |
branches: [ "main" ] | |
env: | |
BUILD_TYPE: COVERAGE | |
jobs: | |
build: | |
runs-on: ubuntu-latest | |
steps: | |
- name: Update apt repo | |
run: sudo apt-get update | |
- name: Install tools manually | |
run: sudo apt-get install lcov gcovr | |
- uses: actions/checkout@v4 | |
- name: Configure CMake | |
working-directory: ${{github.workspace}}/test | |
run: cmake -DTEST=ON -DCODE_COVERAGE=ON -B ${{github.workspace}}/test/build -DCMAKE_BUILD_TYPE=${{env.BUILD_TYPE}} | |
- name: Build | |
working-directory: ${{github.workspace}}/test | |
# Build your program with the given configuration | |
run: cmake --build ${{github.workspace}}/test/build --config ${{env.BUILD_TYPE}} | |
- name: Run tests | |
working-directory: ${{github.workspace}}/test | |
run: ./dsm_tests.out | |
- name: create Report | |
working-directory: ${{github.workspace}}/test | |
run: lcov --capture --directory .. --output-file coverage.xml | |
- uses: codecov/codecov-action@v4.5.0 | |
env: | |
CODECOV_TOKEN: ${{ secrets.CODECOV_TOKEN }} | |
with: | |
token: ${{ secrets.CODECOV_TOKEN }} | |
file: ${{github.workspace}}/test/coverage.xml # optional | |
flags: unittests # optional | |
name: codecov-umbrella # optional | |
fail_ci_if_error: true # optional (default = false) |