diff --git a/.github/workflows/linters.yml b/.github/workflows/linters.yml index 695bd86b5d95ad..78344490800cf0 100644 --- a/.github/workflows/linters.yml +++ b/.github/workflows/linters.yml @@ -163,6 +163,16 @@ jobs: - uses: actions/checkout@1af3b93b6815bc44a9784bd300feb67ff0d1eeb3 # v6.0.0 with: persist-credentials: false + sparse-checkout: | + /Makefile + /benchmark/ + /doc/ + /lib/ + /src/node_version.h + /tools/ + pyproject.toml + *.py + sparse-checkout-cone-mode: false - name: Set up Python ${{ env.PYTHON_VERSION }} uses: actions/setup-python@83679a892e2d95755f2dac6acb0bfd1e9ac5d548 # v6.1.0 with: @@ -181,6 +191,12 @@ jobs: - uses: actions/checkout@1af3b93b6815bc44a9784bd300feb67ff0d1eeb3 # v6.0.0 with: persist-credentials: false + sparse-checkout: | + /Makefile + /tools/pip/ + *.yml + *.yaml + sparse-checkout-cone-mode: false - name: Use Python ${{ env.PYTHON_VERSION }} uses: actions/setup-python@83679a892e2d95755f2dac6acb0bfd1e9ac5d548 # v6.1.0 with: @@ -200,6 +216,10 @@ jobs: - uses: actions/checkout@1af3b93b6815bc44a9784bd300feb67ff0d1eeb3 # v6.0.0 with: persist-credentials: false + sparse-checkout: | + /tools/lint-sh.mjs + *.sh + sparse-checkout-cone-mode: false - run: shellcheck -V - name: Lint Shell scripts run: tools/lint-sh.mjs . @@ -221,6 +241,10 @@ jobs: with: fetch-depth: 2 persist-credentials: false + sparse-checkout: | + /tools/lint-pr-url.mjs + /doc/api/ + sparse-checkout-cone-mode: false # GH Actions squashes all PR commits, HEAD^ refers to the base branch. - run: git diff HEAD^ HEAD -G"pr-url:" -- "*.md" | ./tools/lint-pr-url.mjs ${{ github.event.pull_request.html_url }} lint-readme: @@ -229,6 +253,10 @@ jobs: - uses: actions/checkout@1af3b93b6815bc44a9784bd300feb67ff0d1eeb3 # v6.0.0 with: persist-credentials: false + sparse-checkout: | + README.md + /tools/lint-readme-lists.mjs + sparse-checkout-cone-mode: false - name: Get team members if possible if: ${{ (github.event.pull_request && github.event.pull_request.base.ref == github.event.pull_request.base.repo.default_branch) || github.event.ref == github.event.repository.default_branch }} id: team_members