From 21b034bb9bcc93a548147d3aad65847f3c9c3af2 Mon Sep 17 00:00:00 2001 From: eleanorjboyd Date: Tue, 30 Jan 2024 11:38:40 -0800 Subject: [PATCH 1/5] include multiple pytest versions in PR check --- .github/workflows/pr-check.yml | 11 ++++++++++- 1 file changed, 10 insertions(+), 1 deletion(-) diff --git a/.github/workflows/pr-check.yml b/.github/workflows/pr-check.yml index 62dff5c876b3..885efea55736 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', '3.12-dev'] # 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,14 @@ jobs: with: python-version: ${{ matrix.python }} + - name: Install specific pytest version + run: | + if [ "${{ matrix.pytest-version }}" = "pytest@pre-release" ]; then + python -m pip install --pre pytest + else + python -m pip install "${{ matrix.pytest-version }}" + fi + - name: Install base Python requirements uses: brettcannon/pip-secure-install@v1 with: From 6a75328bde715e2d334d06fc2d711634bb2b8d6f Mon Sep 17 00:00:00 2001 From: eleanorjboyd Date: Tue, 30 Jan 2024 11:46:22 -0800 Subject: [PATCH 2/5] fix if --- .github/workflows/pr-check.yml | 8 +++++--- 1 file changed, 5 insertions(+), 3 deletions(-) diff --git a/.github/workflows/pr-check.yml b/.github/workflows/pr-check.yml index 885efea55736..f5a8e7e9ae2e 100644 --- a/.github/workflows/pr-check.yml +++ b/.github/workflows/pr-check.yml @@ -109,12 +109,14 @@ jobs: python-version: ${{ matrix.python }} - name: Install specific pytest version + if: matrix.pytest-version == 'pytest@pre-release' run: | - if [ "${{ matrix.pytest-version }}" = "pytest@pre-release" ]; then python -m pip install --pre pytest - else + + - name: Install specific pytest version + if: matrix.pytest-version != 'pytest@pre-release' + run: | python -m pip install "${{ matrix.pytest-version }}" - fi - name: Install base Python requirements uses: brettcannon/pip-secure-install@v1 From 7db4465f06b7506d701722bad851b87f986162da Mon Sep 17 00:00:00 2001 From: Eleanor Boyd Date: Tue, 30 Jan 2024 14:31:24 -0800 Subject: [PATCH 3/5] Update .github/workflows/pr-check.yml Co-authored-by: Karthik Nadig --- .github/workflows/pr-check.yml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.github/workflows/pr-check.yml b/.github/workflows/pr-check.yml index f5a8e7e9ae2e..42809be6cfe9 100644 --- a/.github/workflows/pr-check.yml +++ b/.github/workflows/pr-check.yml @@ -94,7 +94,7 @@ 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'] # run for 3 pytest versions, most recent stable, oldest version supported and pre-release + python: ['3.8', '3.x', '3.12'] # 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: From ab7ff56cc8ed3f6657866ac0804bb7e60d7f02d3 Mon Sep 17 00:00:00 2001 From: Eleanor Boyd Date: Tue, 30 Jan 2024 14:31:29 -0800 Subject: [PATCH 4/5] Update .github/workflows/pr-check.yml Co-authored-by: Karthik Nadig --- .github/workflows/pr-check.yml | 2 ++ 1 file changed, 2 insertions(+) diff --git a/.github/workflows/pr-check.yml b/.github/workflows/pr-check.yml index 42809be6cfe9..82a30769c2ee 100644 --- a/.github/workflows/pr-check.yml +++ b/.github/workflows/pr-check.yml @@ -118,6 +118,8 @@ jobs: 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: From 35d8d640f92654c09d03fb2fc6fe632928e6de2d Mon Sep 17 00:00:00 2001 From: eleanorjboyd Date: Wed, 31 Jan 2024 09:23:12 -0800 Subject: [PATCH 5/5] use 3.x instead of specifying 3.12 --- .github/workflows/pr-check.yml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.github/workflows/pr-check.yml b/.github/workflows/pr-check.yml index 82a30769c2ee..5ec7027c74e5 100644 --- a/.github/workflows/pr-check.yml +++ b/.github/workflows/pr-check.yml @@ -94,7 +94,7 @@ 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'] # run for 3 pytest versions, most recent stable, oldest version supported and pre-release + 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: