Open
Conversation
Runs pytest with marker-based exclusions (-m "not integration and not e2e and not real") to skip tests requiring paid API calls. Triggers on PRs to main and pushes to main (with path exclusions for docs/config-only changes). Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
- Install pytest-timeout and use --timeout=60 to kill hanging tests (e.g. test_connect_defaults hangs ~15min due to unmocked cloud calls) - Use pytest-xdist -n auto for parallel execution across CPU cores - pytest-xdist is already in [dev] extras Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
- Set PDD_PATH env var pointing to pdd package directory - Ignore test files with unmocked LLM/cloud subprocess calls that timeout in CI: test_connect, test_bug_to_unit_test, test_context_generator, test_crash_main, test_generate_test, test_fix_error_loop - Deselect 2 zsh-specific tests (no zsh on ubuntu-latest) Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
Comment on lines
28
to
61
| if: github.event.pull_request.draft != true | ||
| name: Run Unit Tests | ||
| runs-on: ubuntu-latest | ||
| timeout-minutes: 30 | ||
|
|
||
| env: | ||
| PDD_PATH: ${{ github.workspace }}/pdd | ||
|
|
||
| steps: | ||
| - name: Checkout | ||
| uses: actions/checkout@v4 | ||
|
|
||
| - name: Set up Python | ||
| uses: actions/setup-python@v5 | ||
| with: | ||
| python-version: '3.12' | ||
| cache: 'pip' | ||
|
|
||
| - name: Install dependencies | ||
| run: pip install -e ".[dev]" pytest-timeout | ||
|
|
||
| - name: Run unit tests | ||
| run: > | ||
| pytest tests/ | ||
| -m "not integration and not e2e and not real" | ||
| -v --tb=short --timeout=60 -n auto | ||
| --ignore=tests/commands/test_connect.py | ||
| --ignore=tests/test_bug_to_unit_test.py | ||
| --ignore=tests/test_context_generator.py | ||
| --ignore=tests/test_crash_main.py | ||
| --ignore=tests/test_generate_test.py | ||
| --ignore=tests/test_fix_error_loop.py | ||
| --deselect=tests/test_setup_tool.py::test_create_api_env_script_with_special_characters_zsh | ||
| --deselect=tests/test_setup_tool.py::test_create_api_env_script_with_common_problematic_characters |
Check warning
Code scanning / CodeQL
Workflow does not contain permissions Medium
Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Summary
pytestwith marker-based exclusions on PRs and pushes to mainintegration,e2e, orreal(those requiring paid API calls)paths-ignoreTest plan
🤖 Generated with Claude Code