Skip to content

Stabilize pkgcheck by gating on commit-level CI completion - #46

Closed
maRce10 with Copilot wants to merge 2 commits into
mainfrom
copilot/fix-pkgcheck-failure-another-one
Closed

Stabilize pkgcheck by gating on commit-level CI completion#46
maRce10 with Copilot wants to merge 2 commits into
mainfrom
copilot/fix-pkgcheck-failure-another-one

Conversation

Copilot AI commented Aug 19, 2026

Copy link
Copy Markdown
Contributor

pkgcheck was intermittently failing on main with Package fails continuous integration checks despite passing R-CMD-check and coverage runs for the same SHA. The failure was a timing issue: pkgcheck evaluated CI status before those workflows had completed.

  • Root cause addressed: CI timing race on main pushes

    • pkgcheck could run before commit-matched R-CMD-check / coverage workflows finished.
    • This produced a false negative in pkgcheck’s CI-health check.
  • Workflow change: add pre-check wait gate

    • In .github/workflows/pkgcheck.yaml, added a github-script step before ropensci-review-tools/pkgcheck-action@main.
    • Scope-limited to push on refs/heads/main.
    • Polls Actions runs for the current context.sha, filtered to workflow names matching /(cmd|coverage)/i.
    • Proceeds only when those runs are completed; fails early if any conclusion is non-success; times out after 15 minutes.
  • Behavioral impact

    • Removes false pkgcheck failures caused by workflow ordering.
    • Preserves strict failure semantics when required CI actually fails.
- name: Wait for CI workflows on this commit
  if: ${{ github.event_name == 'push' && github.ref == 'refs/heads/main' }}
  uses: actions/github-script@v7
  with:
    script: |
      const sha = context.sha
      const pattern = /(cmd|coverage)/i
      # poll workflow runs for this sha until completed, then enforce success

Co-authored-by: maRce10 <13245502+maRce10@users.noreply.github.com>
Copilot AI changed the title [WIP] Fix failing GitHub Actions job pkgcheck Stabilize pkgcheck by gating on commit-level CI completion Aug 19, 2026
Copilot AI requested a review from maRce10 August 19, 2026 14:41
@maRce10
maRce10 marked this pull request as ready for review August 21, 2026 11:23
@maRce10 maRce10 closed this Aug 21, 2026
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants