From ee2569b70c256157b69b0ff1ce753ae57385ec8f Mon Sep 17 00:00:00 2001 From: Ryan Walters Date: Fri, 5 Sep 2025 21:49:57 -0500 Subject: [PATCH] ci: drop coveralls, add codecov config, change badge --- .github/workflows/coverage.yaml | 36 ++------------------------------- README.md | 6 +++--- codecov.yml | 17 ++++++++++++++++ 3 files changed, 22 insertions(+), 37 deletions(-) create mode 100644 codecov.yml diff --git a/.github/workflows/coverage.yaml b/.github/workflows/coverage.yaml index 4ddd7cf..7af8d23 100644 --- a/.github/workflows/coverage.yaml +++ b/.github/workflows/coverage.yaml @@ -9,8 +9,6 @@ env: jobs: coverage: runs-on: ubuntu-latest - env: - COVERALLS_REPO_TOKEN: ${{ secrets.COVERALLS_REPO_TOKEN }} steps: - name: Checkout code uses: actions/checkout@v5 @@ -54,35 +52,5 @@ jobs: uses: codecov/codecov-action@v5 with: token: ${{ secrets.CODECOV_TOKEN }} - 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 + files: ./lcov.info + disable_search: true diff --git a/README.md b/README.md index 4cfba98..85e496c 100644 --- a/README.md +++ b/README.md @@ -1,16 +1,16 @@ # Pac-Man -[![Tests Status][badge-test]][test] [![Build Status][badge-build]][build] [![If you're seeing this, Coveralls.io is broken again and it's not my fault.][badge-coverage]][coverage] [![Online Demo][badge-online-demo]][demo] [![Last Commit][badge-last-commit]][commits] +[![Tests Status][badge-test]][test] [![Build Status][badge-build]][build] [![Code Coverage][badge-coverage]][coverage] [![Online Demo][badge-online-demo]][demo] [![Last Commit][badge-last-commit]][commits] [badge-test]: https://github.com/Xevion/Pac-Man/actions/workflows/tests.yaml/badge.svg [badge-build]: https://github.com/Xevion/Pac-Man/actions/workflows/build.yaml/badge.svg -[badge-coverage]: https://coveralls.io/repos/github/Xevion/Pac-Man/badge.svg?branch=master +[badge-coverage]: https://codecov.io/github/Xevion/Pac-Man/branch/master/graph/badge.svg?token=R2RBYUQK3I [badge-demo]: https://img.shields.io/github/deployments/Xevion/Pac-Man/github-pages?label=GitHub%20Pages [badge-online-demo]: https://img.shields.io/badge/GitHub%20Pages-Demo-brightgreen [badge-last-commit]: https://img.shields.io/github/last-commit/Xevion/Pac-Man [build]: https://github.com/Xevion/Pac-Man/actions/workflows/build.yaml [test]: https://github.com/Xevion/Pac-Man/actions/workflows/tests.yaml -[coverage]: https://coveralls.io/github/Xevion/Pac-Man?branch=master +[coverage]: https://codecov.io/github/Xevion/Pac-Man [demo]: https://xevion.github.io/Pac-Man/ [commits]: https://github.com/Xevion/Pac-Man/commits/master diff --git a/codecov.yml b/codecov.yml new file mode 100644 index 0000000..0f3ce60 --- /dev/null +++ b/codecov.yml @@ -0,0 +1,17 @@ +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