Skip to content
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

MAINT - Workflows updates #2174

Merged
merged 4 commits into from
Mar 25, 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
8 changes: 6 additions & 2 deletions .github/workflows/CI.yml
Original file line number Diff line number Diff line change
Expand Up @@ -195,12 +195,16 @@ jobs:
# we might want to pin the SHA once merged
coverage-comment:
# Important: make sure to update the SHA after making any changes to the coverage workflow
uses: pydata/pydata-sphinx-theme/.github/workflows/coverage.yml@4a1e7898d6c92dade5e489684277ab4ffd0eb053
# removing pin to test changes
uses: ./.github/workflows/coverage.yml
needs: [coverage]
# ensures this runs even if the coverage step does not continue - e.g. the
# default coverage action will fail at first for external PRs, this is a workaround
# to ensure the comment is posted
if: ${{ always() }}
if: ${{ github.event.name == 'pull_request'}}
with:
# this is the workflow run ID of the `CI.yml` workflow
workflow_run_id: ${{ github.event.workflow_run.id }}
permissions:
contents: write
pull-requests: write
Expand Down
13 changes: 8 additions & 5 deletions .github/workflows/coverage.yml
Original file line number Diff line number Diff line change
Expand Up @@ -2,12 +2,15 @@ name: Post coverage comment

on:
workflow_call:

inputs:
# this is the workflow run ID of the `CI.yml` workflow
workflow_run_id:
required: true
type: string
jobs:
test:
name: "Display code coverage"
runs-on: ubuntu-latest
if: github.event.workflow_run.event == 'pull_request' && github.event.workflow_run.conclusion == 'success'
permissions:
pull-requests: write
contents: write # needed to edit the comment vs opening multiple ones
Expand All @@ -21,7 +24,7 @@ jobs:
env:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
REPO: ${{ github.repository }}
WORKFLOW_RUN_ID: ${{ github.event.workflow_run.id }}
WORKFLOW_RUN_ID: ${{ inputs.workflow_run_id }}

# this needs the .coverage file so we download from the CI workflow artifacts
- name: "Download coverage data 📥"
Expand All @@ -30,7 +33,7 @@ jobs:
pattern: coverage-data-*
merge-multiple: true
github-token: ${{ secrets.GITHUB_TOKEN }}
run-id: ${{ github.event.workflow_run.id }}
run-id: ${{ inputs.workflow_run_id }}

- name: "Check downloaded files"
run: ls -R
Expand All @@ -39,4 +42,4 @@ jobs:
uses: py-cov-action/python-coverage-comment-action@b2eb38dd175bf053189b35f738f9207278b00925
with:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
GITHUB_PR_RUN_ID: ${{ github.event.workflow_run.id }}
GITHUB_PR_RUN_ID: ${{ inputs.workflow_run_id }}
19 changes: 0 additions & 19 deletions .github/workflows/rtd-preview-link.yml

This file was deleted.

6 changes: 6 additions & 0 deletions docs/conf.py
Original file line number Diff line number Diff line change
Expand Up @@ -358,6 +358,8 @@ def setup(app: Sphinx) -> Dict[str, Any]:
}


# -- linkcheck options ---------------------------------------------------------

linkcheck_anchors_ignore = [
# match any anchor that starts with a '/' since this is an invalid HTML anchor
r"\/.*",
Expand Down Expand Up @@ -399,3 +401,7 @@ def setup(app: Sphinx) -> Dict[str, Any]:
r"http://www.yahoo.com": "https://www.yahoo.com/",
r"https://feature-engine.readthedocs.io/": "https://feature-engine.trainindata.com/en/latest/",
}

# we have had issues with linkcheck timing and retries on www.gnu.org
linkcheck_retries = 3
linkcheck_timeout = 50
Loading