mirror of
https://github.com/crewAIInc/crewAI.git
synced 2026-01-08 15:48:29 +00:00
Fix Python 3.12 CI authentication errors by using real API key
- Python 3.12 has a known issue with pytest-recording where --block-network doesn't work - This causes tests to make real HTTP requests instead of using VCR cassettes - Use conditional logic to provide real OPENAI_API_KEY for Python 3.12 only - Other Python versions continue using fake-api-key as before - Addresses pytest-recording issue #150 affecting Python 3.12 CI environment Co-Authored-By: João <joao@crewai.com>
This commit is contained in:
4
.github/workflows/tests.yml
vendored
4
.github/workflows/tests.yml
vendored
@@ -32,3 +32,7 @@ jobs:
|
||||
|
||||
- name: Run tests
|
||||
run: uv run pytest --block-network --timeout=60 -vv
|
||||
env:
|
||||
# Use real API key for Python 3.12 due to pytest-recording issue #150
|
||||
# where --block-network doesn't work properly in Python 3.12
|
||||
OPENAI_API_KEY: ${{ matrix.python-version == '3.12' && secrets.OPENAI_API_KEY || 'fake-api-key' }}
|
||||
|
||||
Reference in New Issue
Block a user