-
Notifications
You must be signed in to change notification settings - Fork 6
Expand file tree
/
Copy pathaction.yml
More file actions
54 lines (53 loc) · 1.5 KB
/
action.yml
File metadata and controls
54 lines (53 loc) · 1.5 KB
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
54
name: "Test on Linux"
description: "Run the unit tests on Linux"
inputs:
build-artifact:
description: "Name of the build artifact that contains the unit test"
required: true
runs:
using: "composite"
steps:
- name: Install Dependencies
shell: bash
run: |
sudo apt-get -qq update
sudo apt-get -qq -y install lcov
sudo apt-get -qq update
- name: Download build test directory
uses: actions/download-artifact@v4
with:
name: ${{ inputs.build-artifact }}
- name: extract build archive
shell: bash
run: |
tar -xzf build.tar.gz
- name: Run unit tests
shell: bash
# always run tests as cmake target coverage
# does not return an error if a test fails
run: |
cd build/tests
sudo chmod a+x gmgpolar_tests
./gmgpolar_tests --gtest_output="xml:testreport.xml"
- name: Compute code coverage
shell: bash
# compute code coverage
run: |
cd build
cmake --build . --target coverage
- name: Upload test report
uses: actions/upload-artifact@v4
with:
name: test-report
path: build/tests/testreport.xml
if-no-files-found: error
retention-days: 3
- name: Upload coverage reports
uses: actions/upload-artifact@v4
with:
name: test-coverage-reports
path: |
build/coverage-filtered.info
build/coverage
if-no-files-found: error
retention-days: 1