Skip to content

trigger-tests

trigger-tests #16

Workflow file for this run

name: Tests
on:
repository_dispatch:
types: [trigger-tests]
jobs:
unit-tests:
runs-on: ubuntu-latest
container:
image: tobitflatscher/lbt
volumes:
- ${{ github.workspace }}:/code/lbt
steps:
- name: Checkout code
uses: actions/checkout@v2
- name: Install gcovr
run: |
apt-get update
apt-get install -y gcovr
- name: Create build folder
run: mkdir build
- name: Run CMake
run: cmake -B /code/lbt/build -S /code/lbt -D VTK_DIR=/code/lbt/../VTK-build -D ENABLE_COVERAGE=True
- name: Compile with Make
run: make -j $(nproc) -C /code/lbt/build
- name: Run unit tests
run: (cd /code/lbt/build/ && ctest -j $(nproc))
- name: Generate code coverage report
run: gcovr -j $(nproc) --filter /code/lbt/include --filter /code/lbt/src --print-summary --xml-pretty --xml /code/lbt/coverage.xml
- name: Update Codecov code coverage report
uses: codecov/codecov-action@v3
with:
files: /code/lbt/coverage.xml