Skip to content

Latest commit

 

History

History
88 lines (53 loc) · 2.39 KB

File metadata and controls

88 lines (53 loc) · 2.39 KB

GitHub Setup Guide

Note: This is a living document that will be refined as the project evolves.

Quick reference for setting up GitHub workflows and branch protection for the MLPerf Inference Endpoint project.

📋 Available GitHub Workflows

Pre-commit Hooks (.github/workflows/pre-commit.yml)

Runs pre-commit hooks (ruff, formatters) on every PR and push.

Auto-Reviewer (.github/workflows/auto-review.yml)

Automatically requests code reviews on new PRs.

Test Workflow (.github/workflows/test.yml)

Runs pytest test suite and generates coverage reports.

CLA Workflow (.github/workflows/cla.yml)

Checks contributor license agreement requirements.

PR Template (.github/pull_request_template.md)

Standardized PR description template.

⚙️ Manual Configuration (GitHub Web UI)

Branch Protection for main

SettingsBranchesAdd rule:

  • Branch pattern: main
  • ✓ Require PR before merging (1 approval)
  • ✓ Require status checks: Pre-commit, Tests, cla-bot
  • ✓ Require conversation resolution
  • ✓ Auto-delete head branches

Full documentation

Repository Settings

SettingsGeneralPull Requests:

  • Enable squash merging, merge commits, and rebase merging
  • Enable auto-delete of head branches

GitHub Actions Permissions

SettingsActionsGeneral:

  • Allow all actions and reusable workflows
  • Enable read and write permissions (for auto-reviewer)

🧪 Quick Test

# Create test branch
git checkout -b feature/test-setup
git push origin feature/test-setup

# Create PR and verify:
# - PR template loads
# - Workflows trigger
# - Branch protection enforced

🔧 Customization

Add Reviewers

Edit .github/workflows/auto-review.yml:

const defaultReviewers = ["username1", "username2"];

Update PR Template

Edit .github/pull_request_template.md for project-specific requirements.

📚 References