fix(ci): skip Coveralls upload when token unavailable

The coverage workflow was failing on Dependabot PRs because
COVERALLS_REPO_TOKEN is not available to PRs from forks for security
reasons. Add a conditional check to skip the upload step when the
token is missing, while still running coverage generation.

This allows PRs to pass CI while retaining coverage reports on master.
This commit is contained in:
Ryan Walters
2025-11-23 01:38:41 -06:00
parent cb50ade88f
commit 203a5c0e2e

View File

@@ -57,6 +57,7 @@ jobs:
working-directory: pacman
- name: Coveralls upload
if: ${{ secrets.COVERALLS_REPO_TOKEN != '' }}
uses: coverallsapp/github-action@v2
with:
github-token: ${{ secrets.COVERALLS_REPO_TOKEN }}