-
Notifications
You must be signed in to change notification settings - Fork 6
Expand file tree
/
Copy pathaction.yml
More file actions
60 lines (59 loc) · 1.85 KB
/
Copy pathaction.yml
File metadata and controls
60 lines (59 loc) · 1.85 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
55
56
57
58
59
60
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
use-mumps:
description: 'Indicates if GMGPolar should be built with mumps support'
type: bool
required: true
runs:
using: "composite"
steps:
- name: Install Dependencies
shell: bash
run: |
apt-get -qq update
apt-get -qq -y install lcov
- name: Install additional dependencies to use MUMPS
if: inputs.use-mumps == 'true'
uses: ./.github/actions/install-dependencies
- name: Download build test directory
uses: actions/download-artifact@v4
with:
name: ${{ inputs.build-artifact }}${{ inputs.use-mumps == 'true' && '-mumps' || ''}}
- 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
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${{ inputs.use-mumps == 'true' && '-mumps' || ''}}
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${{ inputs.use-mumps == 'true' && '-mumps' || ''}}
path: |
build/coverage-filtered.info
build/coverage
if-no-files-found: error
retention-days: 1