From c074d63bdaec8c6fd43b53c936602c4c1bf011aa Mon Sep 17 00:00:00 2001 From: Maxwell G Date: Wed, 9 Aug 2023 17:12:53 +0000 Subject: [PATCH] ci: make nox a reusable workflow Co-authored-by: Sviatoslav Sydorenko --- .github/workflows/ci.yaml | 4 ++++ .github/workflows/pip-compile-dev.yml | 1 - .github/workflows/pip-compile-docs.yml | 3 +-- .github/workflows/{nox.yml => reusable-nox.yml} | 6 +----- .github/workflows/reusable-pip-compile.yml | 1 + 5 files changed, 7 insertions(+), 8 deletions(-) rename .github/workflows/{nox.yml => reusable-nox.yml} (88%) diff --git a/.github/workflows/ci.yaml b/.github/workflows/ci.yaml index 1309b011939..a3a8e6834d8 100644 --- a/.github/workflows/ci.yaml +++ b/.github/workflows/ci.yaml @@ -4,6 +4,7 @@ on: push: branches-ignore: - 'patchback/**' + - 'pip-compile/**' pull_request: workflow_dispatch: @@ -55,3 +56,6 @@ jobs: - name: Run rstcheck Sanity run: | python tests/sanity.py rstcheck + + nox: + uses: ./.github/workflows/reusable-nox.yml diff --git a/.github/workflows/pip-compile-dev.yml b/.github/workflows/pip-compile-dev.yml index 1b2deb0f315..befde055072 100644 --- a/.github/workflows/pip-compile-dev.yml +++ b/.github/workflows/pip-compile-dev.yml @@ -39,5 +39,4 @@ jobs: -e 'pip-compile-3.10(formatters)' 'pip-compile-3.10(typing)' 'pip-compile-3.10(static)' - changed-files: "tests/*.txt" reset-branch: "${{ inputs.reset-branch || false }}" diff --git a/.github/workflows/pip-compile-docs.yml b/.github/workflows/pip-compile-docs.yml index 73bab4ef4cf..00585e79422 100644 --- a/.github/workflows/pip-compile-docs.yml +++ b/.github/workflows/pip-compile-docs.yml @@ -35,6 +35,5 @@ jobs: message: "ci: refresh docs build dependencies" base-branch: "${{ inputs.base-branch || 'devel' }}" pr-branch: "${{ inputs.pr-branch || 'pip-compile/devel/docs' }}" - nox-args: "-e 'pip-compile-3.10(requirements)'" - changed-files: "tests/*.txt" + nox-args: "-e 'pip-compile-3.10(requirements)' 'pip-compile-3.10(requirements-relaxed)'" reset-branch: "${{ inputs.reset-branch || false }}" diff --git a/.github/workflows/nox.yml b/.github/workflows/reusable-nox.yml similarity index 88% rename from .github/workflows/nox.yml rename to .github/workflows/reusable-nox.yml index 0cd2385eaa7..72baa63196e 100644 --- a/.github/workflows/nox.yml +++ b/.github/workflows/reusable-nox.yml @@ -2,11 +2,7 @@ name: nox "on": - push: - branches-ignore: - - 'patchback/**' - pull_request: - workflow_dispatch: + workflow_call: jobs: nox: diff --git a/.github/workflows/reusable-pip-compile.yml b/.github/workflows/reusable-pip-compile.yml index 18afcfa3541..9cb408a7ca9 100644 --- a/.github/workflows/reusable-pip-compile.yml +++ b/.github/workflows/reusable-pip-compile.yml @@ -46,6 +46,7 @@ name: "Refresh pinned dependencies" type: string required: true changed-files: + default: "tests/*.txt" type: string required: true reset-branch: