Skip to content
Merged
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
24 changes: 18 additions & 6 deletions .github/workflows/_link_check.yml
Original file line number Diff line number Diff line change
Expand Up @@ -12,34 +12,46 @@ jobs:
with:
runner: linux.2xlarge
docker-image: executorch-ubuntu-22.04-linter
submodules: 'none'
submodules: false
fetch-depth: 0
ref: ${{ inputs.ref }}
timeout: 90
timeout: 120
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 }}"; } \
|| \
{ [ "${{ github.event_name }}" = "push" ] \
&& git diff --name-only "${{ github.event.before }}...${{ github.sha }}"; }
)
) || {
echo
echo "URL lint failed."
echo "If this is a transient outage, you can bypass it by adding the \`skip-url-lint\` label to your PR."
echo "Or add \`@lint-ignore\` somewhere on the same line as the URL you want to skip checking."
exit 1
}

lint-xrefs:
if: ${{ github.event_name != 'pull_request' || !contains(github.event.pull_request.labels.*.name, 'skip-xref-lint') }}
uses: pytorch/test-infra/.github/workflows/linux_job_v2.yml@main
with:
runner: linux.2xlarge
docker-image: executorch-ubuntu-22.04-linter
submodules: 'none'
submodules: false
fetch-depth: 0
ref: ${{ inputs.ref }}
timeout: 90
timeout: 60
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 }}"; } \
|| \
{ [ "${{ github.event_name }}" = "push" ] \
&& git diff --name-only "${{ github.event.before }}...${{ github.sha }}"; }
)
) || {
echo
echo "Xref lint failed."
echo "If this is a transient outage, you can bypass it by adding the \`skip-xref-lint\` label to your PR."
echo "Or add \`@lint-ignore\` somewhere on the same line as the reference you want to skip checking."
exit 1
}
Loading