Thanks to visit codestin.com
Credit goes to github.com

Skip to content
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
35 changes: 35 additions & 0 deletions action.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,35 @@
name: Setup Nox
description: 'Prepares all python versions for nox'
branding:
icon: package
color: blue

runs:
using: composite
steps:
- uses: actions/setup-python@v3
with:
python-version: "pypy-3.7"
- uses: actions/setup-python@v3
with:
python-version: "pypy-3.8"
- uses: actions/setup-python@v3
with:
python-version: "pypy-3.9"

- uses: actions/setup-python@v3
with:
python-version: "3.7"
- uses: actions/setup-python@v3
with:
python-version: "3.8"
- uses: actions/setup-python@v3
with:
python-version: "3.9"
- uses: actions/setup-python@v3
with:
python-version: "3.10"

- name: "Install nox"
run: pipx install '${{ github.action_path }}'
shell: bash
7 changes: 4 additions & 3 deletions docs/tutorial.rst
Original file line number Diff line number Diff line change
Expand Up @@ -27,17 +27,18 @@ Or you can be extra fancy and use `pipx`_:

Either way, Nox is usually installed *globally*, similar to ``tox``, ``pip``, and other similar tools.

If you're interested in running ``nox`` within `docker`_, you can use the `thekevjames/nox images`_ on DockerHub which contain builds for all ``nox`` versions and all supported ``python`` versions.
If you're interested in running ``nox`` within `docker`_, you can use the `thekevjames/nox images`_ on DockerHub which contain builds for all ``nox`` versions and all supported ``python`` versions. Nox is also supported via ``pipx run nox`` in the `manylinux images`_.

If you want to run ``nox`` within `GitHub Actions`_, you can use the `excitedleigh/setup-nox action`_, which installs the latest ``nox`` and makes available all Python versions provided by the GitHub Actions environment.
If you want to run ``nox`` within `GitHub Actions`_, you can use the `wntrblm/nox action`_, which installs the latest ``nox`` and makes available all active CPython and PyPY versions provided by the GitHub Actions environment. You can safely combine this with with ``setup-python`` for past end-of-life or development versions of Python, as well.

.. _pip: https://pip.readthedocs.org
.. _user site: https://packaging.python.org/tutorials/installing-packages/#installing-to-the-user-site
.. _pipx: https://packaging.python.org/guides/installing-stand-alone-command-line-tools/
.. _docker: https://www.docker.com/
.. _thekevjames/nox images: https://hub.docker.com/r/thekevjames/nox
.. _GitHub Actions: https://github.com/features/actions
.. _excitedleigh/setup-nox action: https://github.com/marketplace/actions/setup-nox
.. _wntrblm/nox action: https://github.com/marketplace/actions/nox
Copy link
Collaborator Author

@henryiii henryiii Apr 7, 2022

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

FYI, this link assumes you click "publish this action" after this in GitHub Actions. In cibuildwheel, we've not done that (to avoid a "this is an action in the marketplace" banner at the top to make it look like it's only for GitHub Actions). If you'd prefer not to "publish to the marketplace" (which doesn't really do anything other than make it a tiny bit more searchable), then this link should point somewhere else, or not be a link at all.

I did check to make sure the name "nox" has not been taken yet.

Copy link
Collaborator

@FollowTheProcess FollowTheProcess Apr 20, 2022

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I can't see any harm in publishing it in this way, it'd be nice to have an official nox action in the marketplace :) If any other maintainers feel differently though please chime in!

Edit: I'm dumb, see below

Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

It just clicked what you meant by this @henryiii! For anyone else as slow to catch on as me, this is what we mean:

image

If we publish the action in the marketplace, the Nox repo will have that banner above it which implies it's just a GitHub action so IMO it's best to avoid as @henryiii did with cibuildwheel

.. _manylinux images: https://github.com/pypa/manylinux

Writing the configuration file
------------------------------
Expand Down
1 change: 1 addition & 0 deletions pyproject.toml
Original file line number Diff line number Diff line change
Expand Up @@ -42,6 +42,7 @@ ignore_missing_imports = true

[tool.check-manifest]
ignore = [
"action.yml",
"docs/**",
"noxfile.py",
"requirements-conda-test.txt",
Expand Down