mirror of
https://github.com/Xevion/Pac-Man.git
synced 2025-12-06 03:15:48 -06:00
Compare commits
2 Commits
| Author | SHA1 | Date | |
|---|---|---|---|
|
|
9633611ae8 | ||
|
|
897b9b8621 |
7
.github/workflows/coverage.yaml
vendored
7
.github/workflows/coverage.yaml
vendored
@@ -46,11 +46,12 @@ jobs:
|
||||
|
||||
- name: Generate coverage report
|
||||
run: |
|
||||
just coverage
|
||||
just coverage-codecov
|
||||
|
||||
- name: Upload coverage reports to Codecov
|
||||
uses: codecov/codecov-action@v5
|
||||
uses: codecov/codecov-action@v4
|
||||
with:
|
||||
token: ${{ secrets.CODECOV_TOKEN }}
|
||||
files: ./lcov.info
|
||||
files: ./codecov.json
|
||||
disable_search: true
|
||||
verbose: true
|
||||
|
||||
1
.gitignore
vendored
1
.gitignore
vendored
@@ -14,6 +14,7 @@ assets/site/build.css
|
||||
|
||||
# Coverage reports
|
||||
lcov.info
|
||||
codecov.json
|
||||
coverage.html
|
||||
|
||||
# Profiling output
|
||||
|
||||
22
Justfile
22
Justfile
@@ -2,8 +2,8 @@ set shell := ["bash", "-c"]
|
||||
set windows-shell := ["powershell.exe", "-NoLogo", "-Command"]
|
||||
|
||||
# Regex to exclude files from coverage report, double escapes for Justfile + CLI
|
||||
# You can use src\\\\..., but the filename alone is acceptable too
|
||||
coverage_exclude_pattern := "src\\\\app\\.rs|audio\\.rs|src\\\\error\\.rs|platform\\\\emscripten\\.rs|bin\\\\.+\\.rs|main\\.rs|platform\\\\desktop\\.rs|platform\\\\tracing_buffer\\.rs|platform\\\\buffered_writer\\.rs|systems\\\\debug\\.rs|systems\\\\profiling\\.rs"
|
||||
# You can use src/..., but the filename alone is acceptable too
|
||||
coverage_exclude_pattern := "src/app\\.rs|audio\\.rs|src/error\\.rs|platform/emscripten\\.rs|bin/.+\\.rs|main\\.rs|platform/desktop\\.rs|platform/tracing_buffer\\.rs|platform/buffered_writer\\.rs|systems/debug\\.rs|systems/profiling\\.rs"
|
||||
|
||||
binary_extension := if os() == "windows" { ".exe" } else { "" }
|
||||
|
||||
@@ -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
|
||||
|
||||
# Generate HTML report (for humans, source line inspection)
|
||||
html: coverage
|
||||
html: coverage-lcov
|
||||
cargo llvm-cov report \
|
||||
--remap-path-prefix \
|
||||
--ignore-filename-regex "{{ coverage_exclude_pattern }}" \
|
||||
@@ -19,13 +19,13 @@ html: coverage
|
||||
--open
|
||||
|
||||
# Display report (for humans)
|
||||
report-coverage: coverage
|
||||
report-coverage: coverage-lcov
|
||||
cargo llvm-cov report \
|
||||
--remap-path-prefix \
|
||||
--ignore-filename-regex "{{ coverage_exclude_pattern }}"
|
||||
|
||||
# Run & generate report (for CI)
|
||||
coverage:
|
||||
# Run & generate LCOV report (as base report)
|
||||
coverage-lcov:
|
||||
cargo llvm-cov \
|
||||
--lcov \
|
||||
--remap-path-prefix \
|
||||
@@ -34,6 +34,16 @@ coverage:
|
||||
--profile coverage \
|
||||
--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'
|
||||
samply:
|
||||
cargo build --profile profile
|
||||
|
||||
14
codecov.yml
14
codecov.yml
@@ -1,17 +1,3 @@
|
||||
coverage:
|
||||
status:
|
||||
project:
|
||||
default:
|
||||
target: 70%
|
||||
patch:
|
||||
default:
|
||||
informational: true
|
||||
|
||||
ignore:
|
||||
- "src/(?:bin|platform))/.+\\.rs"
|
||||
- "src/(?:app|events|formatter)\\.rs"
|
||||
|
||||
comment:
|
||||
layout: "reach,diff,flags,files,footer"
|
||||
behavior: default
|
||||
require_changes: false
|
||||
|
||||
Reference in New Issue
Block a user