ci: Test all R versions on branches that start with cran- - #822
Conversation
There was a problem hiding this comment.
Pull request overview
This PR modifies the R-CMD-check workflow to enable comprehensive testing across all R versions for branches that start with "cran-". Previously, full R version matrix testing was restricted to scheduled runs and manual workflow dispatches.
Changes:
- Modified the
versions-matrixstep condition to generate the version matrix for pull requests from branches starting with "cran-" - Removed event-type restrictions from the
rcc-fulljob, allowing it to run whenever a version matrix is available rather than only on scheduled or manually dispatched runs
💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.
| # - pull requests if the base repo is different from the head repo and the branch name does not start with "cran-" | ||
| # Do not run for: | ||
| # - workflow_dispatch if not requested | ||
| # Always run for other events. |
There was a problem hiding this comment.
The comment incorrectly describes the condition. It states "pull requests if the base repo is different from the head repo and the branch name does not start with 'cran-'", but the logic uses OR, not AND. The step actually runs for pull requests when EITHER the repos are different (external PR) OR the branch starts with 'cran-' (internal or external). The comment should be updated to accurately reflect that for pull requests, the step runs when: (1) it's an external PR from any branch, OR (2) the branch name starts with 'cran-' regardless of whether it's internal or external.
| # - pull requests if the base repo is different from the head repo and the branch name does not start with "cran-" | |
| # Do not run for: | |
| # - workflow_dispatch if not requested | |
| # Always run for other events. | |
| # - pull requests if either the base repo is different from the head repo (external PR) or the branch name starts with "cran-" (internal or external) | |
| # Do not run for: | |
| # - workflow_dispatch if not requested | |
| # Always run for other non-pull_request events. |
| runs-on: ${{ matrix.os }} | ||
|
|
||
| if: ${{ needs.rcc-smoke.outputs.versions-matrix != '' && (github.event_name == 'schedule' || (github.event_name == 'workflow_dispatch' && inputs.run-rcc-full)) }} | ||
| if: ${{ needs.rcc-smoke.outputs.versions-matrix != '' }} |
There was a problem hiding this comment.
The removal of the condition restricting rcc-full to only run on 'schedule' and 'workflow_dispatch' events means this job will now run in many more scenarios (e.g., on push events to branches like cran-*, and on pull requests from branches starting with cran-). This significantly expands when the full test matrix runs. Verify this is the intended behavior, as it may substantially increase CI resource usage and runtime for events that previously only ran the smoke test.
| if: ${{ needs.rcc-smoke.outputs.versions-matrix != '' }} | |
| if: ${{ needs.rcc-smoke.outputs.versions-matrix != '' && (github.event_name == 'schedule' || (github.event_name == 'workflow_dispatch' && inputs.run-rcc-full)) }} |
No description provided.