diff --git a/.github/workflows/reusable-nox.yml b/.github/workflows/reusable-nox.yml index 9c67f218f1..fed59bdef2 100644 --- a/.github/workflows/reusable-nox.yml +++ b/.github/workflows/reusable-nox.yml @@ -11,7 +11,7 @@ jobs: fail-fast: false matrix: include: - # Inputs: + # matrix: # session: name of session # python-versions: comma-separated list of Python versions to install # extra-args (optional): extra arguments to pass to nox session. @@ -21,32 +21,40 @@ jobs: python-versions: "3.12" - session: typing python-versions: "3.12" - - session: spelling + - session: "spelling" python-versions: "3.12" - - session: "checkers(rstcheck)" + - session: checkers(rstcheck) python-versions: "3.12" - - session: "checkers(rst-yamllint)" + - session: checkers(rst-yamllint) python-versions: "3.12" - - session: "checkers(docs-build)" + - session: checkers(docs-build) python-versions: "3.12" - - session: "actionlint" + - session: actionlint python-versions: "3.12" - - session: "pip-compile" + - session: pip-compile extra-args: "--check" python-versions: "3.12" + name: "Run nox ${{ matrix.session }} session" steps: - name: Check out repo uses: actions/checkout@v5 + - name: Setup nox uses: wntrblm/nox@2025.05.01 with: python-versions: "${{ matrix.python-versions }}" + - name: Graft ansible-core - run: | - nox -e clone-core - - name: "Run nox -e ${{ matrix.session }}" - run: | - # Using GHA expression interpolation is fine here, - # as we control all the inputs. - nox -e "${{ matrix.session }}" -- ${{ matrix.extra-args }} + uses: ansible-community/github-action-run-nox@v1 + with: + sessions: clone-core + force-pythons: "${{ matrix.python-versions }}" + + - name: "Run nox session" + uses: ansible-community/github-action-run-nox@v1 + with: + sessions: "${{ matrix.session }}" + extra-args: "${{ matrix.extra-args || '' }}" + force-pythons: "${{ matrix.python-versions }}" +