Skip to content

ansible-community/github-action-run-nox

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

10 Commits
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

GitHub Action for running nox

Linting REUSE status

A composite GitHub Action that runs nox. It assumes nox has already been installed, for example using the wntrblm/nox GitHub Action.

This action is covered by the Ansible Code of Conduct.

Usage

To use the action, add the following step to your workflow file (for example .github/workflows/nox.yml) with the following steps in a job:

- name: Check out your repository
  uses: actions/checkout@v4
  with:
    working-directory: my-code

- name: Install nox
  uses: wntrblm/[email protected]
  with:
    python-versions: "3.11, 3.12, 3.13"

- name: Lint
  uses: ansible-community/github-action-run-nox@v1
  with:
    sessions: lint
    force-pythons: 3.11 3.12 3.13
    working-directory: my-code

Versioning

The main branch contains the latest development version. The v1 branch contains a stable version that should not get breaking changes. For the time being, v1 is updated to the content of main after some testing.

Options

The follow options can be provided to this GitHub Action.

Option Description
sessions
(default: "")
Which nox session(s) to run. If left empty, all sessions marked as default will be run. Can be a space-separated list of sessions.
Example: formatters codeqa.
force-pythons
(default: "")
Which version(s) of Python to force. Should be a space-separated list of Python versions.
Example: 3.11 3.12 3.13.
working-directory
(default: .)
The directory in which all commands should be run.
codecov
(default: false)
Whether code coverage is collected by the session(s) and should be uploaded. If set to true, the codecov/codecov-action action will be used to upload code coverage.
codecov-session
(default: "")
If a special nox session should be run to collect/analyze code coverage. This is done as an extra step.
codecov-name
(default: "")
If a name should be supplied to codecov. If not specified, will fall back to sessions.
codecov-token
(default: "")
Should be provided with the value of secrets.CODECOV_TOKEN if codecov=true.

License

This action is primarily licensed and distributed as a whole under the GNU General Public License v3.0 or later.

See LICENSES/GPL-3.0-or-later.txt for the full text.

All files have a machine readable SDPX-License-Identifier: comment denoting its respective license(s) or an equivalent entry in an accompanying .license file. This conforms to the REUSE specification.

About

Convenience GitHub Action to run nox, to be combined with the wntrblm/nox action

Resources

License

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published