From b8335df22691aec466329377c4109022962f9a90 Mon Sep 17 00:00:00 2001 From: Lyle McKarns Date: Fri, 31 Oct 2025 14:23:02 -0400 Subject: [PATCH 1/4] Convert to using nox GHA --- .github/workflows/reusable-nox.yml | 66 ++++++++++++++---------------- 1 file changed, 30 insertions(+), 36 deletions(-) diff --git a/.github/workflows/reusable-nox.yml b/.github/workflows/reusable-nox.yml index 9c67f218f1..2fc58f5f2e 100644 --- a/.github/workflows/reusable-nox.yml +++ b/.github/workflows/reusable-nox.yml @@ -3,50 +3,44 @@ name: nox "on": workflow_call: + inputs: + python-versions: + description: Space-seperated list of python version(s) to run nox sessions with + type: string + required: false + default: "3.12" + sessions: + description: Space-seperated list of sessions + type: string + required: false + default: "static formatters_check typing spelling checkers(rstcheck) checkers(rst-yamllint) checkers(docs-build) actionlint" + jobs: nox: runs-on: ubuntu-latest - strategy: - fail-fast: false - matrix: - include: - # Inputs: - # session: name of session - # python-versions: comma-separated list of Python versions to install - # extra-args (optional): extra arguments to pass to nox session. - - session: static - python-versions: "3.12" - - session: formatters_check - python-versions: "3.12" - - session: typing - python-versions: "3.12" - - session: spelling - python-versions: "3.12" - - session: "checkers(rstcheck)" - python-versions: "3.12" - - session: "checkers(rst-yamllint)" - python-versions: "3.12" - - session: "checkers(docs-build)" - python-versions: "3.12" - - session: "actionlint" - python-versions: "3.12" - - session: "pip-compile" - extra-args: "--check" - python-versions: "3.12" - name: "Run nox ${{ matrix.session }} session" + name: "Run nox sessions" steps: - name: Check out repo uses: actions/checkout@v5 + - name: Setup nox uses: wntrblm/nox@2025.05.01 with: - python-versions: "${{ matrix.python-versions }}" + python-versions: "${{ inputs.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: x1101/github-action-run-nox@ca8b16f76c53a04b14952620e7a4ac5c7dc29812 + with: + sessions: clone-core + + - name: "Run nox sessions" + uses: x1101/github-action-run-nox@ca8b16f76c53a04b14952620e7a4ac5c7dc29812 + with: + sessions: "${{ inputs.sessions }}" + + - name: "Run Sessions with Args" + uses: x1101/github-action-run-nox@ca8b16f76c53a04b14952620e7a4ac5c7dc29812 + with: + sessions: "pip-compile" + extra-args: "--check" \ No newline at end of file From ed1e54b69b72bbcbb93f7808d6fe9cbeccb16731 Mon Sep 17 00:00:00 2001 From: Lyle McKarns Date: Sat, 8 Nov 2025 11:25:45 -0500 Subject: [PATCH 2/4] Added the session Matrix back - Per discussions, added the sessions matrix back in, instead of a single string list of sessions to support cleaner output of statuses --- .github/workflows/reusable-nox.yml | 54 +++++++++++++++++++----------- 1 file changed, 34 insertions(+), 20 deletions(-) diff --git a/.github/workflows/reusable-nox.yml b/.github/workflows/reusable-nox.yml index 2fc58f5f2e..38f10a7da0 100644 --- a/.github/workflows/reusable-nox.yml +++ b/.github/workflows/reusable-nox.yml @@ -3,23 +3,39 @@ name: nox "on": workflow_call: - inputs: - python-versions: - description: Space-seperated list of python version(s) to run nox sessions with - type: string - required: false - default: "3.12" - sessions: - description: Space-seperated list of sessions - type: string - required: false - default: "static formatters_check typing spelling checkers(rstcheck) checkers(rst-yamllint) checkers(docs-build) actionlint" - jobs: nox: runs-on: ubuntu-latest - name: "Run nox sessions" + strategy: + fail-fast: false + matrix: + include: + # Inputs: + # session: name of session + # python-versions: comma-separated list of Python versions to install + # extra-args (optional): extra arguments to pass to nox session. + - session: static + python-versions: "3.12" + - session: formatters_check + python-versions: "3.12" + - session: typing + python-versions: "3.12" + - session: spelling + python-versions: "3.12" + - session: "checkers(rstcheck)" + python-versions: "3.12" + - session: "checkers(rst-yamllint)" + python-versions: "3.12" + - session: "checkers(docs-build)" + python-versions: "3.12" + - session: "actionlint" + python-versions: "3.12" + - 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 @@ -33,14 +49,12 @@ jobs: uses: x1101/github-action-run-nox@ca8b16f76c53a04b14952620e7a4ac5c7dc29812 with: sessions: clone-core + force-pythons: "${{ inputs.python-versions }}" - - name: "Run nox sessions" + - name: "Run nox session" uses: x1101/github-action-run-nox@ca8b16f76c53a04b14952620e7a4ac5c7dc29812 with: - sessions: "${{ inputs.sessions }}" + sessions: "${{ matrix.sessions }}" + extra-args: ${{ inputs.extra-args || '' }} + force-pythons: "${{ inputs.python-versions }}" - - name: "Run Sessions with Args" - uses: x1101/github-action-run-nox@ca8b16f76c53a04b14952620e7a4ac5c7dc29812 - with: - sessions: "pip-compile" - extra-args: "--check" \ No newline at end of file From 3b47178cffa234699386a03ae5c840ac83297a7d Mon Sep 17 00:00:00 2001 From: Lyle McKarns Date: Sat, 8 Nov 2025 15:46:10 -0500 Subject: [PATCH 3/4] Working to resolve failed checks - Replaced (temp) x1101/github-action-run-nox with ansible-community/github-action-run-nox - Repalced "matrix.sessions" with "matrix.session" - All sessions now in quotes --- .github/workflows/reusable-nox.yml | 16 ++++++++-------- 1 file changed, 8 insertions(+), 8 deletions(-) diff --git a/.github/workflows/reusable-nox.yml b/.github/workflows/reusable-nox.yml index 38f10a7da0..debdea9f2a 100644 --- a/.github/workflows/reusable-nox.yml +++ b/.github/workflows/reusable-nox.yml @@ -15,13 +15,13 @@ jobs: # session: name of session # python-versions: comma-separated list of Python versions to install # extra-args (optional): extra arguments to pass to nox session. - - session: static + - session: "static" python-versions: "3.12" - - session: formatters_check + - session: "formatters_check" python-versions: "3.12" - - session: typing + - session: "typing" python-versions: "3.12" - - session: spelling + - session: "spelling" python-versions: "3.12" - session: "checkers(rstcheck)" python-versions: "3.12" @@ -46,15 +46,15 @@ jobs: python-versions: "${{ inputs.python-versions }}" - name: Graft ansible-core - uses: x1101/github-action-run-nox@ca8b16f76c53a04b14952620e7a4ac5c7dc29812 + uses: ansible-community/github-action-run-nox@v1 with: sessions: clone-core force-pythons: "${{ inputs.python-versions }}" - name: "Run nox session" - uses: x1101/github-action-run-nox@ca8b16f76c53a04b14952620e7a4ac5c7dc29812 + uses: ansible-community/github-action-run-nox@v1 with: - sessions: "${{ matrix.sessions }}" - extra-args: ${{ inputs.extra-args || '' }} + sessions: "${{ matrix.session }}" + extra-args: "${{ inputs.extra-args || '' }}" force-pythons: "${{ inputs.python-versions }}" From ebf170cae47516f75d8a055738596b75d85a96dc Mon Sep 17 00:00:00 2001 From: Lyle McKarns Date: Sat, 8 Nov 2025 16:01:42 -0500 Subject: [PATCH 4/4] Error Fixup - Replaced `inputs.` with `matrix.` This resovles the `actionlint` errors --- .github/workflows/reusable-nox.yml | 10 +++++----- 1 file changed, 5 insertions(+), 5 deletions(-) diff --git a/.github/workflows/reusable-nox.yml b/.github/workflows/reusable-nox.yml index debdea9f2a..d6d2082f0f 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. @@ -43,18 +43,18 @@ jobs: - name: Setup nox uses: wntrblm/nox@2025.05.01 with: - python-versions: "${{ inputs.python-versions }}" + python-versions: "${{ matrix.python-versions }}" - name: Graft ansible-core uses: ansible-community/github-action-run-nox@v1 with: sessions: clone-core - force-pythons: "${{ inputs.python-versions }}" + force-pythons: "${{ matrix.python-versions }}" - name: "Run nox session" uses: ansible-community/github-action-run-nox@v1 with: sessions: "${{ matrix.session }}" - extra-args: "${{ inputs.extra-args || '' }}" - force-pythons: "${{ inputs.python-versions }}" + extra-args: "${{ matrix.extra-args || '' }}" + force-pythons: "${{ matrix.python-versions }}"