diff --git a/.github/workflows/pr-check.yml b/.github/workflows/pr-check.yml index 62dff5c876b3..5ec7027c74e5 100644 --- a/.github/workflows/pr-check.yml +++ b/.github/workflows/pr-check.yml @@ -94,7 +94,8 @@ jobs: # macOS runners are expensive, and we assume that Ubuntu is enough to cover the Unix case. os: [ubuntu-latest, windows-latest] # Run the tests on the oldest and most recent versions of Python. - python: ['3.8', '3.x', '3.12-dev'] + python: ['3.8', '3.x'] # run for 3 pytest versions, most recent stable, oldest version supported and pre-release + pytest-version: ['pytest', 'pytest@pre-release', 'pytest==6.2.0'] steps: - name: Checkout @@ -107,6 +108,18 @@ jobs: with: python-version: ${{ matrix.python }} + - name: Install specific pytest version + if: matrix.pytest-version == 'pytest@pre-release' + run: | + python -m pip install --pre pytest + + - name: Install specific pytest version + if: matrix.pytest-version != 'pytest@pre-release' + run: | + python -m pip install "${{ matrix.pytest-version }}" + + - name: Install specific pytest version + run: python -m pytest --version - name: Install base Python requirements uses: brettcannon/pip-secure-install@v1 with: