Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Use pipx to run nox / build in GHA workflows #517

Merged
merged 1 commit into from
Apr 10, 2022
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
7 changes: 1 addition & 6 deletions .github/workflows/docs.yml
Original file line number Diff line number Diff line change
Expand Up @@ -28,10 +28,5 @@ jobs:
python-version: "3.9"
cache: "pip"

- name: Install dependencies
run: |
python -m pip install --upgrade pip
python -m pip install --upgrade nox

- name: Build documentation
run: python -m nox --error-on-missing-interpreters -s docs
run: pipx run nox --error-on-missing-interpreters -s docs
18 changes: 2 additions & 16 deletions .github/workflows/lint.yml
Original file line number Diff line number Diff line change
Expand Up @@ -30,13 +30,8 @@ jobs:
python-version: "3.9"
cache: "pip"

- name: Install dependencies
run: |
python -m pip install --upgrade pip
python -m pip install --upgrade nox

- name: Run `nox -s lint`
run: python -m nox --error-on-missing-interpreters -s lint
run: pipx run nox --error-on-missing-interpreters -s lint
mayeut marked this conversation as resolved.
Show resolved Hide resolved

build:
name: Build sdist and wheel
Expand All @@ -50,17 +45,8 @@ jobs:
steps:
- uses: actions/checkout@v1

- uses: actions/setup-python@v3
name: Install Python
with:
python-version: "3.9"
cache: 'pip'

- name: Install dependencies
run: python -m pip install --upgrade build

- name: Build
run: pyproject-build
run: pipx run build

- name: Archive files
uses: actions/upload-artifact@v1
Expand Down
14 changes: 2 additions & 12 deletions .github/workflows/test.yml
Original file line number Diff line number Diff line change
Expand Up @@ -34,21 +34,11 @@ jobs:
python-version: ${{ matrix.python_version }}
cache: "pip"

- name: Install dependencies
run: |
python -m pip install --upgrade pip
python -m pip install nox
shell: bash

- name: Run nox
run: |
python -m nox --error-on-missing-interpreters -s tests-${{ matrix.python_version }}
shell: bash
run: pipx run nox --error-on-missing-interpreters -s tests-${{ matrix.python_version }}
if: ${{ ! startsWith( matrix.python_version, 'pypy' ) }}

# Binary is named 'pypy3', but setup-python specifies it as 'pypy-3.x'.
- name: Run nox for pypy3
run: |
python -m nox --error-on-missing-interpreters -s tests-pypy3
shell: bash
run: pipx run nox --error-on-missing-interpreters -s tests-pypy3
if: ${{ startsWith( matrix.python_version, 'pypy' ) }}