mirror of
https://github.com/Xevion/Pac-Man.git
synced 2025-12-07 16:07:54 -06:00
Compare commits
22 Commits
| Author | SHA1 | Date | |
|---|---|---|---|
|
|
5deccc54a7 | ||
|
|
2455d9724b | ||
|
|
ac7c1b9ce1 | ||
|
|
d68d76c854 | ||
|
|
f1927cc67e | ||
|
|
68ab4627d8 | ||
|
|
0d8d869580 | ||
|
|
a31b85b5df | ||
|
|
21b08d4866 | ||
|
|
f075caaa17 | ||
|
|
9422168ffc | ||
|
|
35e557e298 | ||
|
|
e810419063 | ||
|
|
f7e7dee28f | ||
|
|
4b0b8f4f2e | ||
|
|
03249c88a4 | ||
|
|
2d4f97e04b | ||
|
|
317fce796c | ||
|
|
9832abd131 | ||
|
|
c94ebc6b4b | ||
|
|
8b23c1c7bd | ||
|
|
5e325a4691 |
38
.github/workflows/coverage.yaml
vendored
38
.github/workflows/coverage.yaml
vendored
@@ -9,6 +9,8 @@ env:
|
||||
jobs:
|
||||
coverage:
|
||||
runs-on: ubuntu-latest
|
||||
env:
|
||||
COVERALLS_REPO_TOKEN: ${{ secrets.COVERALLS_REPO_TOKEN }}
|
||||
steps:
|
||||
- name: Checkout code
|
||||
uses: actions/checkout@v5
|
||||
@@ -46,11 +48,41 @@ jobs:
|
||||
|
||||
- name: Generate coverage report
|
||||
run: |
|
||||
just coverage-codecov
|
||||
just coverage
|
||||
|
||||
- name: Upload coverage reports to Codecov
|
||||
uses: codecov/codecov-action@v5
|
||||
with:
|
||||
token: ${{ secrets.CODECOV_TOKEN }}
|
||||
files: ./codecov.json
|
||||
disable_search: true
|
||||
files: lcov.info
|
||||
|
||||
- name: Download Coveralls CLI
|
||||
if: ${{ env.COVERALLS_REPO_TOKEN != '' }}
|
||||
run: |
|
||||
# use GitHub Releases URL instead of coveralls.io because they can't maintain their own files; it 404s
|
||||
curl -L https://github.com/coverallsapp/coverage-reporter/releases/download/v0.6.15/coveralls-linux-x86_64.tar.gz | tar -xz -C /usr/local/bin
|
||||
|
||||
- name: Upload coverage to Coveralls
|
||||
if: ${{ env.COVERALLS_REPO_TOKEN != '' }}
|
||||
run: |
|
||||
if [ ! -f "lcov.info" ]; then
|
||||
echo "Error: lcov.info file not found. Coverage generation may have failed."
|
||||
exit 1
|
||||
fi
|
||||
|
||||
for i in {1..10}; do
|
||||
echo "Attempt $i: Uploading coverage to Coveralls..."
|
||||
if coveralls -n report lcov.info; then
|
||||
echo "Successfully uploaded coverage report."
|
||||
exit 0
|
||||
fi
|
||||
|
||||
if [ $i -lt 10 ]; then
|
||||
delay=$((2**i))
|
||||
echo "Attempt $i failed. Retrying in $delay seconds..."
|
||||
sleep $delay
|
||||
fi
|
||||
done
|
||||
|
||||
echo "Failed to upload coverage report after 10 attempts."
|
||||
exit 1
|
||||
|
||||
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
|
||||
|
||||
# Generate HTML report (for humans, source line inspection)
|
||||
html: coverage-lcov
|
||||
html: coverage
|
||||
cargo llvm-cov report \
|
||||
--remap-path-prefix \
|
||||
--ignore-filename-regex "{{ coverage_exclude_pattern }}" \
|
||||
@@ -19,13 +19,13 @@ html: coverage-lcov
|
||||
--open
|
||||
|
||||
# Display report (for humans)
|
||||
report-coverage: coverage-lcov
|
||||
report-coverage: coverage
|
||||
cargo llvm-cov report \
|
||||
--remap-path-prefix \
|
||||
--ignore-filename-regex "{{ coverage_exclude_pattern }}"
|
||||
|
||||
# Run & generate LCOV report (as base report)
|
||||
coverage-lcov:
|
||||
# Run & generate report (for CI)
|
||||
coverage:
|
||||
cargo llvm-cov \
|
||||
--lcov \
|
||||
--remap-path-prefix \
|
||||
@@ -34,16 +34,6 @@ coverage-lcov:
|
||||
--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
|
||||
|
||||
17
codecov.yml
17
codecov.yml
@@ -1,17 +0,0 @@
|
||||
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
|
||||
@@ -266,7 +266,7 @@ pub fn debug_render_system(
|
||||
}
|
||||
|
||||
canvas.set_draw_color(Color {
|
||||
a: f32_to_u8(0.65),
|
||||
a: f32_to_u8(0.6),
|
||||
..Color::RED
|
||||
});
|
||||
canvas.set_blend_mode(sdl2::render::BlendMode::Blend);
|
||||
|
||||
Reference in New Issue
Block a user