-
Notifications
You must be signed in to change notification settings - Fork 5
34 lines (32 loc) · 1.06 KB
/
run-tests.yml
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
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