forked from eclipse-bluechi/bluechi
-
Notifications
You must be signed in to change notification settings - Fork 0
53 lines (44 loc) · 1.37 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
43
44
45
46
47
48
49
50
51
52
53
name: Unit tests
on:
push:
branches: [main, hirte-*]
pull_request:
branches: [main, hirte-*]
workflow_dispatch:
jobs:
test:
runs-on: ubuntu-latest
container:
image: quay.io/bluechi/build-base:latest
steps:
- name: Checkout sources
uses: actions/checkout@v3
with:
submodules: 'true'
- name: Building BlueChi
run: |
meson setup builddir
meson configure -Db_coverage=true builddir
meson compile -C builddir
- name: Running unit tests
run: |
meson test --wrap='valgrind --leak-check=full --error-exitcode=1 --track-origins=yes' -C builddir
- name: Generating coverage report
run: |
ninja coverage-html -C builddir
- name: Upload unit test logs
if: always()
uses: actions/upload-artifact@v3
with:
name: unit-test-logs
path: ./builddir/meson-logs/testlog-valgrind.txt
- name: Upload coverage HTML artifact
uses: actions/upload-artifact@v3
with:
name: coverage
path: builddir/meson-logs/coveragereport
if-no-files-found: error
- name: Report coverage results
run: |
cd builddir/meson-logs/coveragereport/
html2text --ignore-images --ignore-links -b 0 --bypass-tables index.html >> $GITHUB_STEP_SUMMARY