Skip to content

ci(tests): run clippy/test on self-hosted, keep fork PRs sandboxed - #88

Merged
mo4islona merged 1 commit into
masterfrom
ci/tests-self-hosted-runners
Jul 14, 2026
Merged

ci(tests): run clippy/test on self-hosted, keep fork PRs sandboxed#88
mo4islona merged 1 commit into
masterfrom
ci/tests-self-hosted-runners

Conversation

@mo4islona

Copy link
Copy Markdown
Contributor

Companion to #86 (docker image build, already merged) — moves the compiling test jobs onto the same self-hosted runners.

What

  • clippy and test[self-hosted, dev-server] for the 8-core speedup + warm cargo cache.
  • fmt stays on ubuntu-latest (no compilation, nothing to gain).

Security (this repo is PUBLIC)

Fork PRs run untrusted code. Runner groups can't gate by trigger, and the fork-PR approval gate is weak (returning contributors auto-run; approval fatigue). So a conditional runs-on keeps fork PRs on ubuntu-latest and routes only trusted events (in-repo branches, push, dispatch) to the self-hosted host:

runs-on: ${{ (github.event_name == 'pull_request' && github.event.pull_request.head.repo.fork) && fromJSON('["ubuntu-latest"]') || fromJSON('["self-hosted", "dev-server"]') }}

Fork code therefore never reaches the dev box regardless of the approval setting.

Cache

Swatinem shared-key: rust-ci so clippy and test share the dependency cache instead of compiling deps twice, plus cache-on-failure.

Requires

subsquid/data access to the dev-server runner group (same as #86).

🤖 Generated with Claude Code

Move the compiling jobs (clippy, test) to [self-hosted, dev-server] for the
8-core speedup and a warm cargo cache. The repo is public, so fork PRs run
untrusted code — a conditional runs-on keeps them on ubuntu-latest. Runner
groups can't gate by trigger, so this split lives in the workflow rather than
relying on the manual fork-PR approval gate.

Give Swatinem a shared-key so clippy and test share the dependency cache
instead of compiling deps twice, plus cache-on-failure. fmt stays on
ubuntu-latest (no compilation).

Co-Authored-By: Claude Opus 4.8 <noreply@anthropic.com>
@mo4islona
mo4islona merged commit d9503d0 into master Jul 14, 2026
1 of 3 checks passed
@mo4islona
mo4islona deleted the ci/tests-self-hosted-runners branch July 14, 2026 12:00
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.

1 participant