Local and Remote CI Parity Guide
October 22, 2025 ยท View on GitHub
Overview
Local CI scripts match GitHub Actions workflows exactly. All scripts automatically ensure your Rust toolchain matches the remote environment before running checks.
How It Works
GitHub Actions uses the latest stable Rust toolchain (via dtolnay/rust-toolchain@stable). Local scripts update to the same version before running checks.
All local CI scripts run rustup update stable before executing checks:
- Local Rust version matches GitHub Actions
- Clippy lints are identical
- Consistent behavior between local and remote
Available Scripts
contributing/scripts/quick-check.sh- Fast pre-push validation (2-3 minutes)contributing/scripts/full-test.sh- Complete test suite (5-10 minutes)contributing/scripts/auto-fix.sh- Auto-fix formatting and clippy issues
All scripts include automatic Rust toolchain synchronization:
# Ensure we're using the latest stable Rust (matches GitHub Actions)
rustup update stable --no-self-update > /dev/null 2>&1 || true
current_version=$(rustc --version)
echo "Using: $current_version"
Workflow
Before Committing
./contributing/scripts/quick-check.sh
This updates Rust and runs all checks in ~2-3 minutes.
Before Releasing
./contributing/scripts/full-test.sh
Runs comprehensive test suite matching GitHub Actions exactly.
Fixing Issues
./contributing/scripts/auto-fix.sh
Auto-formats code, fixes clippy warnings, and verifies with quick-check.
Verification
Check your local environment matches remote:
./contributing/scripts/quick-check.sh
rustc --version # Should show latest stable
Implementation Details
The || true in rustup update allows scripts to continue if:
- Network is unavailable
- Rust is already up-to-date
- Update fails for any reason
Scripts report the Rust version being used and continue with checks.
Maintenance
When GitHub Actions updates:
- Check
.github/workflows/full-test.yml - Update
contributing/scripts/full-test.shto match - Update
contributing/scripts/quick-check.shif needed
Keep scripts and workflows in sync.