Skip to content

Move link checks to a dedicated workflow #10540

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Merged
merged 10 commits into from
Apr 29, 2025
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
37 changes: 37 additions & 0 deletions .github/workflows/_link_check.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,37 @@
on:
workflow_call:
inputs:
ref:
type: string
required: true

jobs:
lint-urls:
uses: pytorch/test-infra/.github/workflows/linux_job_v2.yml@main
with:
runner: linux.2xlarge
docker-image: executorch-ubuntu-22.04-linter
submodules: 'none'
fetch-depth: 0
ref: ${{ inputs.ref }}
timeout: 90
script: |
./scripts/lint_urls.sh $(
[ "${{ github.event_name }}" = "pull_request" ] \
&& git diff --name-only ${{ github.event.pull_request.base.sha }} ${{ github.event.pull_request.head.sha }}
)

lint-xrefs:
uses: pytorch/test-infra/.github/workflows/linux_job_v2.yml@main
with:
runner: linux.2xlarge
docker-image: executorch-ubuntu-22.04-linter
submodules: 'none'
fetch-depth: 0
ref: ${{ inputs.ref }}
timeout: 90
script: |
./scripts/lint_xrefs.sh $(
[ "${{ github.event_name }}" = "pull_request" ] \
&& git diff --name-only ${{ github.event.pull_request.base.sha }} ${{ github.event.pull_request.head.sha }}
)
23 changes: 2 additions & 21 deletions .github/workflows/lint.yml
Original file line number Diff line number Diff line change
Expand Up @@ -64,29 +64,10 @@ jobs:

exit $RC

lint-urls:
uses: pytorch/test-infra/.github/workflows/linux_job_v2.yml@main
link-check:
uses: ./.github/workflows/_link_check.yml
with:
runner: linux.2xlarge
docker-image: executorch-ubuntu-22.04-linter
submodules: 'none'
fetch-depth: 0
ref: ${{ github.event_name == 'pull_request' && github.event.pull_request.head.sha || github.sha }}
timeout: 90
script: |
./scripts/lint_urls.sh

lint-xrefs:
uses: pytorch/test-infra/.github/workflows/linux_job_v2.yml@main
with:
runner: linux.2xlarge
docker-image: executorch-ubuntu-22.04-linter
submodules: 'none'
fetch-depth: 0
ref: ${{ github.event_name == 'pull_request' && github.event.pull_request.head.sha || github.sha }}
timeout: 90
script: |
./scripts/lint_xrefs.sh

android-java-format:
uses: pytorch/test-infra/.github/workflows/linux_job_v2.yml@main
Expand Down
6 changes: 6 additions & 0 deletions .github/workflows/nightly.yml
Original file line number Diff line number Diff line change
Expand Up @@ -30,3 +30,9 @@ jobs:
test-infra-ref: main
updatebot-token: ${{ secrets.UPDATEBOT_TOKEN }}
pytorchbot-token: ${{ secrets.GH_PYTORCHBOT_TOKEN }}

link-check:
needs: update-pytorch-commit-hash
uses: ./.github/workflows/_link_check.yml
with:
ref: ${{ github.sha }}
Loading