|
48 | 48 | with:
|
49 | 49 | tool: cargo-nextest,cargo-llvm-cov,cargo-binstall
|
50 | 50 |
|
| 51 | + - name: Install llvm-cov-pretty (HTL report generator) |
| 52 | + run: cargo binstall -y llvm-cov-pretty |
| 53 | + |
51 | 54 | - uses: actions/setup-python@v5
|
52 | 55 | with:
|
53 | 56 | python-version: 3.x
|
@@ -83,36 +86,37 @@ jobs:
|
83 | 86 | python -m pip install clang-tools
|
84 | 87 | clang-tools --install ${{ matrix.version }}
|
85 | 88 |
|
86 |
| - - name: Collect Coverage (for codecov.io) |
87 |
| - if: matrix.version == '16' && runner.os == 'Linux' |
| 89 | + - name: Collect Coverage |
88 | 90 | working-directory: cpp-linter-lib
|
89 | 91 | env:
|
90 | 92 | CLANG_VERSION: ${{ matrix.version }}
|
91 |
| - run: cargo llvm-cov --hide-instantiations --lib --codecov --output-path .coverage.json nextest |
92 |
| - |
93 |
| - - uses: codecov/codecov-action@v3 |
94 |
| - if: matrix.version == '16' && runner.os == 'Linux' |
95 |
| - with: |
96 |
| - token: ${{secrets.CODECOV_TOKEN}} |
97 |
| - files: cpp-linter-lib/.coverage.json |
98 |
| - fail_ci_if_error: true # optional (default = false) |
99 |
| - |
100 |
| - - name: Install llvm-cov-pretty (HTL report generator) |
101 |
| - if: matrix.version != '16' && runner.os != 'Linux' |
102 |
| - run: cargo binstall -y llvm-cov-pretty |
| 93 | + run: cargo llvm-cov --hide-instantiations --lib --no-report nextest |
103 | 94 |
|
104 |
| - - name: Collect Coverage (for HTML report) |
105 |
| - if: matrix.version != '16' && runner.os != 'Linux' |
| 95 | + - name: Generate Coverage HTML report |
106 | 96 | working-directory: cpp-linter-lib
|
107 | 97 | env:
|
108 | 98 | CLANG_VERSION: ${{ matrix.version }}
|
109 | 99 | run: |
|
110 |
| - cargo llvm-cov --hide-instantiations --lib --json --output-path .coverage.json nextest |
| 100 | + cargo llvm-cov report --json --output-path .coverage.json |
111 | 101 | llvm-cov-pretty .coverage.json
|
112 | 102 |
|
113 | 103 | - name: Upload coverage data
|
114 | 104 | uses: actions/upload-artifact@v4
|
115 |
| - if: matrix.version != '16' && runner.os != 'Linux' |
116 | 105 | with:
|
117 | 106 | name: HTML_report-${{ runner.os }}-clang_v${{ matrix.version }}
|
118 | 107 | path: target/llvm-cov-pretty
|
| 108 | + |
| 109 | + - name: Generate Coverage lcov report |
| 110 | + if: matrix.version == '16' && runner.os == 'Linux' |
| 111 | + working-directory: cpp-linter-lib |
| 112 | + env: |
| 113 | + CLANG_VERSION: ${{ matrix.version }} |
| 114 | + run: | |
| 115 | + cargo llvm-cov report --lcov --output-path lcov.info |
| 116 | +
|
| 117 | + - uses: codecov/codecov-action@v3 |
| 118 | + if: matrix.version == '16' && runner.os == 'Linux' |
| 119 | + with: |
| 120 | + token: ${{secrets.CODECOV_TOKEN}} |
| 121 | + files: cpp-linter-lib/lcov.info |
| 122 | + fail_ci_if_error: true # optional (default = false) |
0 commit comments