Skip to content

Build pull requests from forks and run CI weekly on main - #767

Merged
andrehjr merged 2 commits into
splitrb:mainfrom
snaka:ci/build-fork-pull-requests
Sep 27, 2026
Merged

andrehjr merged 2 commits into
splitrb:mainfrom
snaka:ci/build-fork-pull-requests

Conversation

@snaka

@snaka snaka commented Sep 27, 2026 •

Copy link
Copy Markdown
Contributor

Summary

Two small CI trigger changes, split into separate commits so either can be dropped.

1. Build pull requests opened from forks (29f114d)

The workflow only runs on push, so pull requests from forks never get CI results (e.g. #727, #745, #765, #766). Travis CI built pull requests by default before the migration to GitHub Actions in 2021.

This adds the pull_request trigger, but the job is skipped when the head branch lives in this repository. Those branches are already built on push, so maintainer and Dependabot branches keep running the matrix exactly once, as today. Their PRs just show an extra skipped test check.

For fork runs, GitHub passes no secrets and gives a read-only GITHUB_TOKEN. This workflow uses neither. Depending on the repository's fork PR approval settings, a maintainer may need to approve runs from new contributors.

2. Build main weekly (fae801e)

Gemfile.lock is not committed, so a new dependency release can break the build while main stays unchanged. json 3.0 did exactly that (see #766), and CI did not show it because nothing had been pushed to main since. A weekly run (Mondays 03:00 UTC) surfaces this kind of breakage early.

Note: GitHub disables scheduled workflows in public repositories after 60 days without activity. They can be re-enabled from the Actions tab.

Verification

  • push builds are unchanged. Together with Pin json below 3.0 for the test suite #766, the full matrix passes on my fork: 18/18 jobs.
  • A PR from a branch in the same repository skips the pull_request run as intended. I verified this with a temporary PR inside my fork.
  • The fork-to-upstream path is exercised by this PR itself: its own pull_request run started without approval. The failing Rails 7.x job there is the json 3.0 issue fixed by Pin json below 3.0 for the test suite #766, unrelated to this change.

🤖 Generated with Claude Code

snaka and others added 2 commits September 27, 2026 14:28
The workflow only runs on push, so pull requests from forks never get
CI results. Travis CI built them by default before the migration to
GitHub Actions.

Add the pull_request trigger, but skip it when the head branch lives in
this repository: those branches are already built on push, so the
matrix would otherwise run twice.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Gemfile.lock is not committed, so a new dependency release can break
the build while main stays unchanged. The json 3.0 release did exactly
that: it broke the Rails 7.x jobs on main (see splitrb#766), but no push to
main has happened since, so CI never showed it. Add a weekly scheduled
run so such breakage shows up without waiting for the next push.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
@andrehjr

Copy link
Copy Markdown
Member

Thanks!

@andrehjr
andrehjr merged commit 795224c into splitrb:main Sep 27, 2026
0 of 18 checks passed
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