diff --git a/README.md b/README.md index 824db68..457d685 100644 --- a/README.md +++ b/README.md @@ -104,3 +104,4 @@ The repository must have the following feature flags enabled: ## Caveats - **Fork PRs are not supported.** Pull requests from forks don't have write access to the base repository, so the action cannot upload coverage. When a fork PR is detected, the action exits gracefully with a notice — it won't fail your CI. +- **Merge queue runs are skipped.** Coverage should be uploaded for PRs and the default branch, making merge queue uploads unnecessary. The action logs a warning and exits successfully. diff --git a/action.yml b/action.yml index 3b7037e..4893c98 100644 --- a/action.yml +++ b/action.yml @@ -34,6 +34,14 @@ runs: exit 1 fi + # Skip coverage upload for merge queue runs — coverage should be + # uploaded for PRs and the default branch, making merge queue + # uploads unnecessary. + if [ "${{ github.event_name }}" = "merge_group" ]; then + echo "::warning::Skipping coverage upload for merge queue. Configure your workflow to upload coverage for PRs and the default branch instead. To avoid spinning up a runner, add \"if: github.event_name != 'merge_group'\" to the upload job." + exit 0 + fi + # Skip coverage upload for fork PRs — the token won't have write # permissions to the base repository. if [ "${{ github.event.pull_request.head.repo.full_name }}" != "" ] && \