Skip to content

Install matrix-specific pytest after test-requirements so pre-release job actually tests pre-release#26027

Draft
eleanorjboyd with Copilot wants to merge 2 commits into
mainfrom
copilot/fix-ci-pre-release-pytest
Draft

Install matrix-specific pytest after test-requirements so pre-release job actually tests pre-release#26027
eleanorjboyd with Copilot wants to merge 2 commits into
mainfrom
copilot/fix-ci-pre-release-pytest

Conversation

Copilot AI commented Jul 2, 2026

Copy link
Copy Markdown

The pytest@pre-release entry in the python-tests matrix was not running against pre-release pytest. build/test-requirements.txt pins pytest<8.1 (required by pytest-black 0.6.0, added in #26009), and it was being installed after the matrix-specific pytest step — silently reverting pre-release/latest pytest back to 8.0.2.

Changes to .github/workflows/pr-check.yml

  • Reordered install steps so test-requirements.txt runs before the matrix-specific pytest install, letting the matrix version win instead of being overridden.
  • Added --upgrade to the specific-pytest step so the plain pytest entry actually moves past the <8.1 pin to the current stable release (previously also silently held at 8.0.2).
  • Renamed the pytest --version step from the duplicated "Install specific pytest version" to "Print pytest version".

The pytest<8.1 pin in test-requirements.txt is retained so pytest-black continues to work; the matrix override now correctly supersedes it for the pre-release and stable jobs.

- name: Install test requirements
  run: python -m pip install --upgrade -r build/test-requirements.txt

# Installed AFTER test-requirements so the pytest<8.1 pin (needed for
# pytest-black) does not clobber the matrix-selected version.
- name: Install specific pytest version (pre-release)
  if: matrix.pytest-version == 'pytest@pre-release'
  run: python -m pip install --upgrade --pre pytest

- name: Install specific pytest version
  if: matrix.pytest-version != 'pytest@pre-release'
  run: python -m pip install --upgrade "${{ matrix.pytest-version }}"

Note: with pre-release pytest now genuinely in effect, the 2496-black-formatter discovery test may surface pytest-black incompatibilities on newer pytest — which is the intended signal of the pre-release job.

Copilot AI changed the title [WIP] Fix CI configuration for pre-release pytest Install matrix-specific pytest after test-requirements so pre-release job actually tests pre-release Jul 2, 2026
Copilot AI requested a review from eleanorjboyd July 2, 2026 22:01
@eleanorjboyd eleanorjboyd added bug Issue identified by VS Code Team member as probable bug skip tests Updates to tests unnecessary skip-issue-check labels Jul 2, 2026
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

bug Issue identified by VS Code Team member as probable bug skip tests Updates to tests unnecessary skip-issue-check

Projects

None yet

Development

Successfully merging this pull request may close these issues.

CI is no longer running against pre-release pytest

2 participants