Commit 6850417 1 parent 19d0a89 commit 6850417 Copy full SHA for 6850417
File tree 1 file changed +34
-25
lines changed
1 file changed +34
-25
lines changed Original file line number Diff line number Diff line change 1
- name : CMake Tests
1
+ name : CMake Build and Test
2
2
3
3
on :
4
4
push :
5
5
branches : [ "main" ]
6
6
pull_request :
7
7
branches : [ "main" ]
8
8
9
+ permissions :
10
+ contents : read
11
+ actions : read
12
+ checks : write
13
+
9
14
jobs :
10
- build-and-test :
15
+ build-test :
16
+ name : Build & Test
11
17
runs-on : ubuntu-latest
12
-
13
18
steps :
14
- - name : Checkout code
15
- uses : actions/checkout@v4
19
+ - name : Checkout code
20
+ uses : actions/checkout@v4
21
+
22
+ - name : Set up build directory
23
+ run : |
24
+ mkdir build
25
+ cd build
26
+ cmake -DCMAKE_BUILD_TYPE=Release ..
27
+ make
16
28
17
- - name : Build and Run Tests with JUnit Report
18
- run : |
19
- mkdir build
20
- cd build
21
- cmake -DGTEST_OUTPUT=xml:gtest-report.xml ..
22
- make
23
- ./tests/unit-tests/LibUnitTests --gtest_output=xml:./gtest-report.xml
29
+ - name : Run tests and generate JUnit report
30
+ run : |
31
+ cd build
32
+ ./tests/unit-tests/LibUnitTests --gtest_output=xml:./test-report.xml
24
33
25
- - name : Upload Test Report
26
- uses : actions/upload-artifact@v3
27
- with :
28
- name : gtest-report
29
- path : build/gtest -report.xml
34
+ - name : Upload Test Report
35
+ uses : actions/upload-artifact@v3
36
+ with :
37
+ name : gtest-report
38
+ path : build/test -report.xml
30
39
31
- - name : Publish Test Results
32
- uses : dorny/test-reporter@v1
33
- if : always()
34
- with :
35
- name : GTest Results
36
- path : build/gtest -report.xml
37
- reporter : jest-junit
38
- fail-on-error : false
40
+ - name : Publish Test Results
41
+ uses : dorny/test-reporter@v1
42
+ if : success() || failure() # run this step even if previous step failed
43
+ with :
44
+ name : Google Test Results # Custom name for the check
45
+ path : build/test -report.xml # Path to the JUnit XML report
46
+ reporter : jest-junit # Specify jest-junit to use the JUnit format
47
+ fail-on-error : false
You can’t perform that action at this time.
0 commit comments