diff --git a/.github/workflows/cla.yml b/.github/workflows/cla.yml index 4d6207d8..d43d359d 100644 --- a/.github/workflows/cla.yml +++ b/.github/workflows/cla.yml @@ -8,9 +8,6 @@ on: branches: [main] # Run in merge queue but skip the step (shows as passing check) merge_group: - types: [checks_requested] - # Note: Don't use branches filter here - merge queue refs like - # gh-readonly-queue/main/pr-N-xxx don't match simple branch globs workflow_dispatch: # Explicitly set permissions for the workflow diff --git a/.github/workflows/claude-code-test.yml b/.github/workflows/claude-code-test.yml index 3a2bb2e3..d78deb5a 100644 --- a/.github/workflows/claude-code-test.yml +++ b/.github/workflows/claude-code-test.yml @@ -14,9 +14,6 @@ on: branches: [main] # Run in the merge queue to validate before merging merge_group: - types: [checks_requested] - # Note: Don't use branches filter here - merge queue refs like - # gh-readonly-queue/main/pr-N-xxx don't match simple branch globs # Ensure only one instance runs at a time per PR/branch concurrency: @@ -28,39 +25,42 @@ permissions: contents: read jobs: - # Job for PRs - always passes, actual validation happens in merge queue - pr-check: - runs-on: ubuntu-latest - if: github.event_name == 'pull_request' - steps: - - name: PR Check - run: echo "Claude Code integration tests will run in the merge queue" - # Job 1: Validate command generation from fixtures (no API key needed) - # Runs on merge_group and workflow_dispatch only + # Runs on all events, but actual work only happens in merge_group/workflow_dispatch + # This ensures the check name exists for PRs (needed for GitHub's merge queue) validate-generation: runs-on: ubuntu-latest - if: github.event_name == 'merge_group' || github.event_name == 'workflow_dispatch' steps: + # For PRs: just pass quickly (actual tests run in merge queue) + - name: Skip on PR + if: github.event_name == 'pull_request' + run: echo "Validation will run in merge queue. Passing for PR." + - uses: actions/checkout@v4 + if: github.event_name != 'pull_request' - name: Install uv + if: github.event_name != 'pull_request' uses: astral-sh/setup-uv@v4 with: version: "latest" - name: Set up Python + if: github.event_name != 'pull_request' uses: actions/setup-python@v5 with: python-version: "3.11" - name: Install dependencies + if: github.event_name != 'pull_request' run: uv sync --extra dev - name: Run fruits workflow tests + if: github.event_name != 'pull_request' run: uv run pytest tests/integration/test_fruits_workflow.py -v - name: Generate commands and validate structure + if: github.event_name != 'pull_request' run: | # Create a test environment mkdir -p test_project/.deepwork/jobs @@ -100,17 +100,24 @@ jobs: # Job 2: Full end-to-end test with Claude Code # Tests the COMPLETE workflow: define job -> implement -> execute - # Runs on merge_group and workflow_dispatch, skipped on PRs (shows as passing check) + # Runs on all events, but actual work only happens in merge_group/workflow_dispatch + # This ensures the check name exists for PRs (needed for GitHub's merge queue) claude-code-e2e: runs-on: ubuntu-latest needs: validate-generation - if: github.event_name == 'merge_group' || github.event_name == 'workflow_dispatch' env: ANTHROPIC_API_KEY: ${{ secrets.ANTHROPIC_API_KEY }} steps: + # For PRs: just pass quickly (actual tests run in merge queue) + - name: Skip on PR + if: github.event_name == 'pull_request' + run: echo "E2E tests will run in merge queue. Passing for PR." + - uses: actions/checkout@v4 + if: github.event_name != 'pull_request' - name: Check for API key + if: github.event_name != 'pull_request' id: check-key run: | if [ -z "$ANTHROPIC_API_KEY" ]; then diff --git a/.github/workflows/validate.yml b/.github/workflows/validate.yml index b90a4bac..c8028c3e 100644 --- a/.github/workflows/validate.yml +++ b/.github/workflows/validate.yml @@ -4,9 +4,6 @@ on: pull_request: branches: [main] merge_group: - types: [checks_requested] - # Note: Don't use branches filter here - merge queue refs like - # gh-readonly-queue/main/pr-N-xxx don't match simple branch globs workflow_dispatch: # Minimal permissions for this workflow