Skip to content

Commit 0dce97e

Browse files
Use pipx
1 parent b6e270c commit 0dce97e

File tree

4 files changed

+21
-32
lines changed

4 files changed

+21
-32
lines changed

.github/actions/build-vsix/action.yml

Lines changed: 4 additions & 12 deletions
Original file line numberDiff line numberDiff line change
@@ -29,32 +29,24 @@ runs:
2929
restore-keys: |
3030
${{ runner.os }}-pip-build-vsix-
3131
32-
- name: Upgrade Pip
33-
run: python -m pip install -U pip
34-
shell: bash
35-
3632
# For faster/better builds of sdists.
37-
- name: Install build pre-requisite
38-
run: python -m pip install wheel
39-
shell: bash
40-
41-
- name: Install nox
42-
run: python -m pip install nox
33+
- name: Update pip, install pipx and install wheel
34+
run: python -m pip install -U pip pipx wheel
4335
shell: bash
4436

4537
- name: Run npm ci
4638
run: npm ci --prefer-offline
4739
shell: bash
4840

4941
- name: Install bundled python libraries
50-
run: python -m nox --session install_bundled_libs
42+
run: pipx run nox --session install_bundled_libs
5143
shell: bash
5244

5345
# Use the GITHUB_RUN_ID environment variable to update the build number.
5446
# GITHUB_RUN_ID is a unique number for each run within a repository.
5547
# This number does not change if you re-run the workflow run.
5648
- name: Update extension build number
57-
run: python -m nox --session update_build_number -- $GITHUB_RUN_ID
49+
run: pipx run nox --session update_build_number -- $GITHUB_RUN_ID
5850
shell: bash
5951

6052
- name: Build VSIX

.github/actions/lint/action.yml

Lines changed: 5 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -40,19 +40,16 @@ runs:
4040
restore-keys: |
4141
${{ runner.os }}-pip-lint-
4242
43-
- name: Upgrade Pip
44-
run: python -m pip install -U pip
45-
shell: bash
46-
47-
- name: Install wheel and nox
48-
run: python -m pip install wheel nox
43+
# For faster/better builds of sdists.
44+
- name: Update pip, install pipx and install wheel
45+
run: python -m pip install -U pip pipx wheel
4946
shell: bash
5047

5148
# This will install libraries to a target directory.
5249
- name: Install bundled python libraries
53-
run: python -m nox --session install_bundled_libs
50+
run: pipx run nox --session install_bundled_libs
5451
shell: bash
5552

5653
- name: Check linting and formatting
57-
run: python -m nox --session lint
54+
run: pipx run nox --session lint
5855
shell: bash

.github/workflows/pr-check.yml

Lines changed: 6 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -59,13 +59,13 @@ jobs:
5959
with:
6060
python-version: '3.7'
6161

62-
- name: Update pip, install wheel and nox
63-
run: python -m pip install -U pip wheel nox
62+
- name: Update pip, install pipx and install wheel
63+
run: python -m pip install -U pip pipx wheel
6464
shell: bash
6565

6666
# This will install libraries to a target directory.
6767
- name: Install bundled python libraries
68-
run: python -m nox --session install_bundled_libs
68+
run: pipx run nox --session install_bundled_libs
6969
shell: bash
7070

7171
- name: Install Node
@@ -86,8 +86,8 @@ jobs:
8686
python-version: ${{ matrix.python }}
8787

8888
# The new python may not have nox so install it again
89-
- name: Update pip, install wheel and nox (again)
90-
run: python -m pip install -U pip wheel nox
89+
- name: Update pip, install pipx and install wheel (again)
90+
run: python -m pip install -U pip pipx wheel
9191
shell: bash
9292

9393
- name: Start xvfb on Linux
@@ -98,7 +98,7 @@ jobs:
9898
if: ${{ runner.os }} == 'Linux'
9999

100100
- name: Run tests
101-
run: python -m nox --session tests
101+
run: pipx run nox --session tests
102102
shell: bash
103103
env:
104104
DISPLAY: ${{ env.DISPLAY }}

.github/workflows/push-check.yml

Lines changed: 6 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -64,13 +64,13 @@ jobs:
6464
with:
6565
python-version: '3.7'
6666

67-
- name: Update pip, install wheel and nox
68-
run: python -m pip install -U pip wheel nox
67+
- name: Update pip, install pipx and install wheel
68+
run: python -m pip install -U pip pipx wheel
6969
shell: bash
7070

7171
# This will install libraries to a target directory.
7272
- name: Install bundled python libraries
73-
run: python -m nox --session install_bundled_libs
73+
run: pipx run nox --session install_bundled_libs
7474
shell: bash
7575

7676
# Now that the bundle is installed to target using python 3.7
@@ -81,10 +81,10 @@ jobs:
8181
python-version: ${{ matrix.python }}
8282

8383
# The new python may not have nox so install it again
84-
- name: Update pip, install wheel and nox (again)
85-
run: python -m pip install -U pip wheel nox
84+
- name: Update pip, install pipx and install wheel (again)
85+
run: python -m pip install -U pip pipx wheel
8686
shell: bash
8787

8888
- name: Run tests
89-
run: python -m nox --session tests
89+
run: pipx run nox --session tests
9090
shell: bash

0 commit comments

Comments
 (0)