diff --git a/.github/workflows/linkcheck.yml b/.github/workflows/linkcheck.yml new file mode 100644 index 000000000..9d14b3938 --- /dev/null +++ b/.github/workflows/linkcheck.yml @@ -0,0 +1,51 @@ +name: Test + +on: + push: + branches-ignore: + - gh-readonly-queue/** # Temporary merge queue-related GH-made branches + pull_request: + types: + - opened # default + - synchronize # default + - reopened # default + - ready_for_review # used in PRs created from GitHub Actions workflows + schedule: + - cron: '0 0 * * *' # Run daily at midnight UTC + workflow_call: + +concurrency: + group: ${{ github.workflow }}-${{ github.event.pull_request.number || github.sha }}-linkcheck + cancel-in-progress: true + +permissions: {} + +jobs: + build: + name: linkcheck + if: ${{ github.repository_owner == 'pypa' }} + runs-on: ubuntu-latest + timeout-minutes: 20 + + steps: + - uses: actions/checkout@08c6903cd8c0fde910a37f88322edcfb5dd907a8 # v5.0.0 + with: + persist-credentials: false + + - name: Set up Python + uses: actions/setup-python@e797f83bcb11b83ae66e0230d6156d7c80228e7c # v6.0.0 + with: + python-version: "3.11" + cache: 'pip' + cache-dependency-path: 'requirements.txt' + + - name: Install dependencies + run: | + python -m pip install --upgrade nox virtualenv + + - name: Nox linkcheck + env: + # Authenticate github.com requests during linkcheck to avoid rate limits. + GITHUB_TOKEN: ${{ github.token }} + run: | + python -m nox -s linkcheck diff --git a/.github/workflows/test.yml b/.github/workflows/test.yml index 8d230d6ba..5f018615e 100644 --- a/.github/workflows/test.yml +++ b/.github/workflows/test.yml @@ -29,7 +29,6 @@ jobs: matrix: noxenv: - build - - linkcheck steps: - uses: actions/checkout@08c6903cd8c0fde910a37f88322edcfb5dd907a8 # v5.0.0 @@ -48,9 +47,6 @@ jobs: python -m pip install --upgrade nox virtualenv - name: Nox ${{ matrix.noxenv }} - env: - # Authenticate github.com requests during linkcheck to avoid rate limits. - GITHUB_TOKEN: ${{ github.token }} run: | python -m nox -s ${{ matrix.noxenv }}