Skip to content

Commit 8854350

Browse files
authored
GitHub Actions: Make pip commands more self-documenting (#10291)
1 parent c8c96d2 commit 8854350

File tree

6 files changed

+23
-25
lines changed

6 files changed

+23
-25
lines changed

.github/workflows/changelog.yml

Lines changed: 2 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -52,9 +52,8 @@ jobs:
5252
run: |
5353
python -m venv venv
5454
. venv/bin/activate
55-
python -m pip install -U pip setuptools wheel
56-
pip install -U -r requirements_test.txt
57-
pip install -U -r doc/requirements.txt
55+
python -m pip install --upgrade pip setuptools wheel
56+
pip install --upgrade --requirement requirements_test.txt --requirement doc/requirements.txt
5857
- name: Emit warning if news fragment is missing
5958
env:
6059
BASE_BRANCH: ${{ github.base_ref }}

.github/workflows/checks.yaml

Lines changed: 2 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -60,9 +60,8 @@ jobs:
6060
run: |
6161
python -m venv venv
6262
. venv/bin/activate
63-
python -m pip install -U pip setuptools wheel
64-
pip install -U -r requirements_test.txt
65-
pip install -U -r doc/requirements.txt
63+
python -m pip install --upgrade pip setuptools wheel
64+
pip install --upgrade --requirement requirements_test.txt --requirement doc/requirements.txt
6665
pip install pre-commit
6766
- name: Generate pre-commit restore key
6867
id: generate-pre-commit-key

.github/workflows/primer-test.yaml

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -30,7 +30,7 @@ jobs:
3030
timeout-minutes: 5
3131
strategy:
3232
matrix:
33-
python-version: [3.9, "3.10", "3.11", "3.12", "3.13"]
33+
python-version: ["3.9", "3.10", "3.11", "3.12", "3.13"]
3434
outputs:
3535
python-key: ${{ steps.generate-python-key.outputs.key }}
3636
steps:
@@ -62,8 +62,8 @@ jobs:
6262
run: |
6363
python -m venv venv
6464
. venv/bin/activate
65-
python -m pip install -U pip setuptools wheel
66-
pip install -U -r requirements_test.txt
65+
python -m pip install --upgrade pip setuptools wheel
66+
pip install --upgrade --requirement requirements_test.txt
6767
6868
pytest-primer-stdlib:
6969
name: run on stdlib / ${{ matrix.python-version }} / Linux
@@ -72,7 +72,7 @@ jobs:
7272
needs: prepare-tests-linux
7373
strategy:
7474
matrix:
75-
python-version: [3.9, "3.10", "3.11", "3.12", "3.13"]
75+
python-version: ["3.9", "3.10", "3.11", "3.12", "3.13"]
7676
steps:
7777
- name: Check out code from GitHub
7878
uses: actions/checkout@v4.2.2

.github/workflows/primer_run_main.yaml

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -58,8 +58,8 @@ jobs:
5858
run: |
5959
python -m venv venv
6060
. venv/bin/activate
61-
python -m pip install -U pip setuptools wheel
62-
pip install -U -r requirements_test.txt
61+
python -m pip install --upgrade pip setuptools wheel
62+
pip install --upgrade --requirement requirements_test.txt
6363
# Save cached Python environment (explicit because cancel-in-progress: true)
6464
- name: Save Python virtual environment to cache
6565
if: steps.cache-venv.outputs.cache-hit != 'true'

.github/workflows/primer_run_pr.yaml

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -70,8 +70,8 @@ jobs:
7070
run: |
7171
python -m venv venv
7272
. venv/bin/activate
73-
python -m pip install -U pip setuptools wheel
74-
pip install -U -r requirements_test.txt
73+
python -m pip install --upgrade pip setuptools wheel
74+
pip install --upgrade --requirement requirements_test.txt
7575
# Save cached Python environment (explicit because cancel-in-progress: true)
7676
- name: Save Python virtual environment
7777
if: steps.cache-venv.outputs.cache-hit != 'true'

.github/workflows/tests.yaml

Lines changed: 11 additions & 11 deletions
Original file line numberDiff line numberDiff line change
@@ -31,7 +31,7 @@ jobs:
3131
strategy:
3232
fail-fast: false
3333
matrix:
34-
python-version: [3.9, "3.10", "3.11", "3.12", "3.13"]
34+
python-version: ["3.9", "3.10", "3.11", "3.12", "3.13"]
3535
outputs:
3636
python-key: ${{ steps.generate-python-key.outputs.key }}
3737
steps:
@@ -63,8 +63,8 @@ jobs:
6363
run: |
6464
python -m venv venv
6565
. venv/bin/activate
66-
python -m pip install -U pip setuptools wheel
67-
pip install -U -r requirements_test.txt
66+
python -m pip install --upgrade pip setuptools wheel
67+
pip install --upgrade --requirement requirements_test.txt
6868
- name: Run pytest
6969
run: |
7070
. venv/bin/activate
@@ -177,7 +177,7 @@ jobs:
177177
strategy:
178178
fail-fast: false
179179
matrix:
180-
python-version: [3.9, "3.10", "3.11", "3.12", "3.13"]
180+
python-version: ["3.9", "3.10", "3.11", "3.12", "3.13"]
181181
steps:
182182
- name: Set temp directory
183183
run: echo "TEMP=$env:USERPROFILE\AppData\Local\Temp" >> $env:GITHUB_ENV
@@ -210,8 +210,8 @@ jobs:
210210
run: |
211211
python -m venv venv
212212
. venv\\Scripts\\activate
213-
python -m pip install -U pip setuptools wheel
214-
pip install -U -r requirements_test_min.txt
213+
python -m pip install --upgrade pip setuptools wheel
214+
pip install --upgrade --requirement requirements_test_min.txt
215215
- name: Run pytest
216216
run: |
217217
. venv\\Scripts\\activate
@@ -227,7 +227,7 @@ jobs:
227227
fail-fast: false
228228
matrix:
229229
# We only run on the oldest supported version on Mac
230-
python-version: [3.9]
230+
python-version: ["3.9"]
231231
steps:
232232
- name: Check out code from GitHub
233233
uses: actions/checkout@v4.2.2
@@ -256,8 +256,8 @@ jobs:
256256
run: |
257257
python -m venv venv
258258
. venv/bin/activate
259-
python -m pip install -U pip setuptools wheel
260-
pip install -U -r requirements_test_min.txt
259+
python -m pip install --upgrade pip setuptools wheel
260+
pip install --upgrade --requirement requirements_test_min.txt
261261
- name: Run pytest
262262
run: |
263263
. venv/bin/activate
@@ -300,8 +300,8 @@ jobs:
300300
run: |
301301
python -m venv venv
302302
. venv/bin/activate
303-
python -m pip install -U pip setuptools wheel
304-
pip install -U -r requirements_test_min.txt
303+
python -m pip install --upgrade pip setuptools wheel
304+
pip install --upgrade --requirement requirements_test_min.txt
305305
- name: Run pytest
306306
run: |
307307
. venv/bin/activate

0 commit comments

Comments
 (0)