mirror of
https://github.com/Xevion/Pac-Man.git
synced 2025-12-07 05:15:49 -06:00
fix: switch from lcov to codecov.json for Codecov reporting
This commit is contained in:
4
.github/workflows/coverage.yaml
vendored
4
.github/workflows/coverage.yaml
vendored
@@ -46,11 +46,11 @@ jobs:
|
|||||||
|
|
||||||
- name: Generate coverage report
|
- name: Generate coverage report
|
||||||
run: |
|
run: |
|
||||||
just coverage
|
just coverage-codecov
|
||||||
|
|
||||||
- name: Upload coverage reports to Codecov
|
- name: Upload coverage reports to Codecov
|
||||||
uses: codecov/codecov-action@v5
|
uses: codecov/codecov-action@v5
|
||||||
with:
|
with:
|
||||||
token: ${{ secrets.CODECOV_TOKEN }}
|
token: ${{ secrets.CODECOV_TOKEN }}
|
||||||
files: ./lcov.info
|
files: ./codecov.json
|
||||||
disable_search: true
|
disable_search: true
|
||||||
|
|||||||
18
Justfile
18
Justfile
@@ -11,7 +11,7 @@ binary_extension := if os() == "windows" { ".exe" } else { "" }
|
|||||||
# !!! --remap-path-prefix prevents the absolute path from being used in the generated report
|
# !!! --remap-path-prefix prevents the absolute path from being used in the generated report
|
||||||
|
|
||||||
# Generate HTML report (for humans, source line inspection)
|
# Generate HTML report (for humans, source line inspection)
|
||||||
html: coverage
|
html: coverage-lcov
|
||||||
cargo llvm-cov report \
|
cargo llvm-cov report \
|
||||||
--remap-path-prefix \
|
--remap-path-prefix \
|
||||||
--ignore-filename-regex "{{ coverage_exclude_pattern }}" \
|
--ignore-filename-regex "{{ coverage_exclude_pattern }}" \
|
||||||
@@ -19,13 +19,13 @@ html: coverage
|
|||||||
--open
|
--open
|
||||||
|
|
||||||
# Display report (for humans)
|
# Display report (for humans)
|
||||||
report-coverage: coverage
|
report-coverage: coverage-lcov
|
||||||
cargo llvm-cov report \
|
cargo llvm-cov report \
|
||||||
--remap-path-prefix \
|
--remap-path-prefix \
|
||||||
--ignore-filename-regex "{{ coverage_exclude_pattern }}"
|
--ignore-filename-regex "{{ coverage_exclude_pattern }}"
|
||||||
|
|
||||||
# Run & generate report (for CI)
|
# Run & generate LCOV report (as base report)
|
||||||
coverage:
|
coverage-lcov:
|
||||||
cargo llvm-cov \
|
cargo llvm-cov \
|
||||||
--lcov \
|
--lcov \
|
||||||
--remap-path-prefix \
|
--remap-path-prefix \
|
||||||
@@ -34,6 +34,16 @@ coverage:
|
|||||||
--profile coverage \
|
--profile coverage \
|
||||||
--no-fail-fast nextest
|
--no-fail-fast nextest
|
||||||
|
|
||||||
|
# Run & generate Codecov report (for CI)
|
||||||
|
coverage-codecov:
|
||||||
|
cargo llvm-cov \
|
||||||
|
--codecov \
|
||||||
|
--remap-path-prefix \
|
||||||
|
--ignore-filename-regex "{{ coverage_exclude_pattern }}" \
|
||||||
|
--output-path codecov.json \
|
||||||
|
--profile coverage \
|
||||||
|
--no-fail-fast nextest
|
||||||
|
|
||||||
# Profile the project using 'samply'
|
# Profile the project using 'samply'
|
||||||
samply:
|
samply:
|
||||||
cargo build --profile profile
|
cargo build --profile profile
|
||||||
|
|||||||
Reference in New Issue
Block a user