File tree Expand file tree Collapse file tree 1 file changed +53
-0
lines changed
Expand file tree Collapse file tree 1 file changed +53
-0
lines changed Original file line number Diff line number Diff line change 1+ name : Code Coverage
2+
3+ on :
4+ push :
5+ branches : [ 'master', 'main', 'release/**' ]
6+ pull_request :
7+ branches : [ '*' ]
8+
9+ jobs :
10+ coverage :
11+ runs-on : ubuntu-latest
12+
13+ steps :
14+ - uses : actions/checkout@v4
15+
16+ # List compiler version
17+ - name : List compiler and gcov version
18+ run : |
19+ gcc --version
20+ gcov --version
21+
22+ # Install gcovr for coverage report generation
23+ - name : Install gcovr
24+ run : |
25+ sudo apt-get update
26+ sudo apt-get install -y gcovr
27+
28+ # Checkout wolfssl
29+ - name : Checkout wolfssl
30+ uses : actions/checkout@v4
31+ with :
32+ repository : wolfssl/wolfssl
33+ path : wolfssl
34+
35+ # Run coverage
36+ - name : Build and run tests with coverage
37+ run : cd test && make coverage WOLFSSL_DIR=../wolfssl
38+
39+ # Display coverage summary in the action log
40+ - name : Display coverage summary
41+ run : |
42+ echo "=== Coverage Summary ==="
43+ cd test
44+ gcovr Build --root .. --filter '\.\./src/.*' --filter '\.\./wolfhsm/.*' --print-summary
45+
46+ # Upload coverage report as artifact
47+ - name : Upload coverage report
48+ uses : actions/upload-artifact@v4
49+ with :
50+ name : coverage-report
51+ path : coverage/
52+ retention-days : 30
53+
You can’t perform that action at this time.
0 commit comments