Skip to content

Commit 35f4c6b

Browse files
committed
ci(rake): test the ref under test, not bootstrap-cloned main
bootstrap.rb clones interscript-ruby remote main into ruby/; a PR's own code was never exercised (and main's red state was unfixable from PRs). Overlay the PR head (or pushed ref) onto the bootstrapped sibling layout after bootstrap.
1 parent 1fe68b4 commit 35f4c6b

1 file changed

Lines changed: 10 additions & 0 deletions

File tree

‎.github/workflows/rake.yml‎

Lines changed: 10 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -37,6 +37,16 @@ jobs:
3737

3838
- name: Bootstrap packages
3939
run: ruby bootstrap.rb
40+
# bootstrap clones interscript-ruby REMOTE MAIN into ruby/ — for
41+
# PRs that would test main's code instead of the PR. Overlay the
42+
# actual ref under test onto the bootstrapped sibling layout.
43+
- name: Overlay the ref under test onto ruby/
44+
uses: actions/checkout@v7
45+
with:
46+
ref: ${{ github.event.pull_request.head.ref || github.ref }}
47+
repository: ${{ github.event.pull_request.head.repo.full_name || github.repository }}
48+
path: ruby
49+
clean: false
4050

4151
- name: Set up Ruby
4252
uses: ruby/setup-ruby@v1

0 commit comments

Comments
 (0)