From e27425f07c9ac223f06fbd1941ce6e2b4a5e7b1c Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Lo=C3=AFc=20Est=C3=A8ve?= Date: Tue, 9 Apr 2024 15:00:01 +0200 Subject: [PATCH] CI Use check-sdist to check sdist rather than check-manifest (#28757) --- .gitattributes | 6 ++++++ .../{check-manifest.yml => check-sdist.yml} | 12 ++++++------ pyproject.toml | 6 ++++++ 3 files changed, 18 insertions(+), 6 deletions(-) create mode 100644 .gitattributes rename .github/workflows/{check-manifest.yml => check-sdist.yml} (75%) diff --git a/.gitattributes b/.gitattributes new file mode 100644 index 0000000000000..f45e0f29ccfa2 --- /dev/null +++ b/.gitattributes @@ -0,0 +1,6 @@ +.* export-ignore +asv_benchmarks export-ignore +azure-pipelines.yml export-ignore +benchmarks export-ignore +build_tools export-ignore +maint_tools export-ignore diff --git a/.github/workflows/check-manifest.yml b/.github/workflows/check-sdist.yml similarity index 75% rename from .github/workflows/check-manifest.yml rename to .github/workflows/check-sdist.yml index 866ff0a796f6f..c02af711bdb6c 100644 --- a/.github/workflows/check-manifest.yml +++ b/.github/workflows/check-sdist.yml @@ -1,11 +1,11 @@ -name: "Check Manifest" +name: "Check sdist" on: schedule: - cron: '0 0 * * *' jobs: - check-manifest: + check-sdist: # Don't run on forks if: github.repository == 'scikit-learn/scikit-learn' @@ -19,15 +19,15 @@ jobs: # scipy and cython are required to build sdist run: | python -m pip install --upgrade pip - pip install check-manifest scipy cython + pip install check-sdist - run: | - check-manifest -v + check-sdist --inject-junk update-tracker: uses: ./.github/workflows/update_tracking_issue.yml if: ${{ always() }} - needs: [check-manifest] + needs: [check-sdist] with: - job_status: ${{ needs.check-manifest.result }} + job_status: ${{ needs.check-sdist.result }} secrets: BOT_GITHUB_TOKEN: ${{ secrets.BOT_GITHUB_TOKEN }} diff --git a/pyproject.toml b/pyproject.toml index 557c0575930eb..2c383f17399a1 100644 --- a/pyproject.toml +++ b/pyproject.toml @@ -203,3 +203,9 @@ exclude= ''' | sklearn/metrics/_pairwise_distances_reduction/_radius_neighbors.pyx ) ''' + +[tool.check-sdist] +# These settings should match .gitattributes +sdist-only = [] +git-only = [".*", "asv_benchmarks", "azure-pipelines.yml", "benchmarks", "build_tools", "maint_tools"] +default-ignore = false