-
Notifications
You must be signed in to change notification settings - Fork 1
42 lines (41 loc) · 1.13 KB
/
unit_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
35
36
37
38
39
40
41
42
name: "Unit tests"
on:
- push
- pull_request
jobs:
unit_tests:
runs-on: "ubuntu-latest"
steps:
- uses: "actions/checkout@v2"
- name: "Install dependencies"
run: |
sudo apt update
sudo apt install -y cmake gcovr libghc-criterion-dev
- name: "Install criterion (unit testing library)"
run: ${GITHUB_WORKSPACE}/.github/install_criterion.sh
shell: bash
- name: "Build"
run: |
cd tests
mkdir build
cd build
cmake ..
make
- name: "Run tests"
run: ./tests/build/unit_tests
- name: "Generate coverage report"
run: |
gcovr -f '' -r . --exclude=tests/ &&
gcovr -f '' -r . --exclude=tests/ --xml -o coverage.xml
- name: Publish coverage report
uses: irongut/CodeCoverageSummary@v1.2.0
with:
filename: coverage.xml
badge: true
fail_below_min: true
format: markdown
hide_branch_rate: false
hide_complexity: false
indicators: true
output: both
thresholds: '25 80'