From 7f58e312fe8bb87575cff19a547b98986b6461e9 Mon Sep 17 00:00:00 2001 From: Devin AI <158243242+devin-ai-integration[bot]@users.noreply.github.com> Date: Mon, 16 Jun 2025 21:52:13 +0000 Subject: [PATCH] Fix Python 3.12 CI authentication errors by using real API key MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit - 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 --- .github/workflows/tests.yml | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/.github/workflows/tests.yml b/.github/workflows/tests.yml index ea69d01d0..03efb9494 100644 --- a/.github/workflows/tests.yml +++ b/.github/workflows/tests.yml @@ -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' }}