Skip to content

Commit f3c0222

Browse files
committed
Add README documenting GitHub Actions and merge queue strategy
Explains workflow configuration, the skip pattern for required checks, and how PRs get fast feedback while merge queue runs full validation.
1 parent 357219e commit f3c0222

1 file changed

Lines changed: 80 additions & 0 deletions

File tree

.github/workflows/README.md

Lines changed: 80 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,80 @@
1+
# GitHub Actions Workflows
2+
3+
This directory contains CI/CD workflows for the DeepWork project. We use GitHub's merge queue for efficient testing.
4+
5+
## Workflow Overview
6+
7+
| Workflow | File | Purpose |
8+
|----------|------|---------|
9+
| **Validate** | `validate.yml` | Linting (ruff) and unit tests |
10+
| **Integration Tests** | `claude-code-test.yml` | Command generation and e2e tests |
11+
| **CLA Assistant** | `cla.yml` | Contributor License Agreement verification |
12+
| **Release** | `release.yml` | PyPI publishing on tags |
13+
14+
## Merge Queue Strategy
15+
16+
We use a skip pattern so the same required checks pass in both PR and merge queue contexts:
17+
18+
| Workflow | On PRs | In Merge Queue |
19+
|----------|--------|----------------|
20+
| **Validate** | Runs | Runs |
21+
| **Integration Tests** | Skipped (passes) | Runs |
22+
| **E2E Tests** | Skipped (passes) | Runs |
23+
| **CLA Check** | Runs | Skipped (passes) |
24+
25+
### How It Works
26+
27+
Jobs/steps use `if: github.event_name == 'merge_group'` conditions to control execution:
28+
29+
```yaml
30+
# Job that only runs in merge queue (skipped on PRs)
31+
jobs:
32+
expensive-tests:
33+
if: github.event_name == 'merge_group' || github.event_name == 'workflow_dispatch'
34+
...
35+
36+
# Step that skips in merge queue (runs on PRs only)
37+
steps:
38+
- name: CLA Check
39+
if: github.event_name != 'merge_group'
40+
...
41+
```
42+
43+
When a job/step is skipped due to an `if` condition, GitHub treats it as a successful check. This allows:
44+
45+
- **Fast PR feedback**: Only lint + unit tests run on every push
46+
- **Thorough merge validation**: Expensive integration/e2e tests run in merge queue before merging
47+
- **No duplicate CLA checks**: CLA is verified on PRs; no need to re-check in merge queue
48+
49+
### Required Checks Configuration
50+
51+
In GitHub branch protection rules, require these checks:
52+
- `Validate / tests`
53+
- `Claude Code Integration Test / validate-generation`
54+
- `Claude Code Integration Test / claude-code-e2e`
55+
- `CLA Assistant / cla-check`
56+
57+
All checks will pass in both PR and merge queue contexts (either by running or by being skipped).
58+
59+
## Workflow Details
60+
61+
### validate.yml
62+
- **Triggers**: `pull_request`, `merge_group`
63+
- **Jobs**: `tests` - runs ruff format/lint checks and pytest unit tests
64+
- Runs on every PR and in merge queue
65+
66+
### claude-code-test.yml
67+
- **Triggers**: `pull_request`, `merge_group`, `workflow_dispatch`
68+
- **Jobs**:
69+
- `validate-generation`: Tests command generation from fixtures (no API key needed)
70+
- `claude-code-e2e`: Full end-to-end test with Claude Code CLI (requires `ANTHROPIC_API_KEY`)
71+
- Both jobs skip on PRs, run in merge queue and manual dispatch
72+
73+
### cla.yml
74+
- **Triggers**: `pull_request_target`, `issue_comment`, `merge_group`
75+
- **Jobs**: `cla-check` - verifies contributors have signed the CLA
76+
- Runs on PRs, skips in merge queue (CLA already verified)
77+
78+
### release.yml
79+
- **Triggers**: Tags matching `v*`
80+
- **Jobs**: Builds and publishes to PyPI

0 commit comments

Comments
 (0)