From 4ba515c9d9e39a808a91a0505df772bc44e2bba3 Mon Sep 17 00:00:00 2001 From: Matthias Dellweg Date: Thu, 14 Nov 2024 17:58:33 +0100 Subject: [PATCH] Move check requirements to lint stage --- .github/workflows/ci.yml | 3 --- .github/workflows/lint.yml | 4 ++++ templates/github/.github/workflows/ci.yml.j2 | 5 ----- templates/github/.github/workflows/lint.yml.j2 | 6 ++++++ templates/github/lint_requirements.txt.j2 | 2 +- 5 files changed, 11 insertions(+), 9 deletions(-) diff --git a/.github/workflows/ci.yml b/.github/workflows/ci.yml index 6b2525ea..29c13f25 100644 --- a/.github/workflows/ci.yml +++ b/.github/workflows/ci.yml @@ -45,9 +45,6 @@ jobs: GITHUB_CONTEXT: "${{ github.event.pull_request.commits_url }}" run: | .github/workflows/scripts/check_commit.sh - - name: "Verify requirements files" - run: | - python .ci/scripts/check_requirements.py lint: uses: "./.github/workflows/lint.yml" diff --git a/.github/workflows/lint.yml b/.github/workflows/lint.yml index f095c16c..e4b99921 100644 --- a/.github/workflows/lint.yml +++ b/.github/workflows/lint.yml @@ -74,6 +74,10 @@ jobs: run: | check-manifest + - name: "Verify requirements files" + run: | + python .ci/scripts/check_requirements.py + - name: "Check for pulpcore imports outside of pulpcore.plugin" run: | sh .ci/scripts/check_pulpcore_imports.sh diff --git a/templates/github/.github/workflows/ci.yml.j2 b/templates/github/.github/workflows/ci.yml.j2 index d583ed2d..69f1f08c 100644 --- a/templates/github/.github/workflows/ci.yml.j2 +++ b/templates/github/.github/workflows/ci.yml.j2 @@ -36,11 +36,6 @@ jobs: run: | .github/workflows/scripts/check_commit.sh {%- endif %} - {%- if lint_requirements %} - - name: "Verify requirements files" - run: | - python .ci/scripts/check_requirements.py - {%- endif %} {%- endif %} {%- if is_pulpdocs_member %} diff --git a/templates/github/.github/workflows/lint.yml.j2 b/templates/github/.github/workflows/lint.yml.j2 index dd88d444..739b4852 100644 --- a/templates/github/.github/workflows/lint.yml.j2 +++ b/templates/github/.github/workflows/lint.yml.j2 @@ -56,6 +56,12 @@ jobs: run: | check-manifest {%- endif %} + {%- if lint_requirements %} + + - name: "Verify requirements files" + run: | + python .ci/scripts/check_requirements.py + {%- endif %} {%- if check_stray_pulpcore_imports %} - name: "Check for pulpcore imports outside of pulpcore.plugin" diff --git a/templates/github/lint_requirements.txt.j2 b/templates/github/lint_requirements.txt.j2 index 251bcf8f..8e0e0225 100644 --- a/templates/github/lint_requirements.txt.j2 +++ b/templates/github/lint_requirements.txt.j2 @@ -1,6 +1,5 @@ {% include 'header.j2' %} -# python packages handy for developers, but not required by pulp {% if black -%} black==24.3.0 {% endif -%} @@ -10,4 +9,5 @@ flake8 {% if black -%} flake8-black {% endif -%} +packaging yamllint