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

Split make linkcheck out into a distinct job [#106] #107

Closed
wants to merge 1 commit into from
Closed
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
17 changes: 13 additions & 4 deletions .github/workflows/docs-ci.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -68,9 +68,6 @@ jobs:
- run: make ${{ inputs.make-target }}
working-directory: ${{ inputs.docs-directory }}

- run: make linkcheck
working-directory: ${{ inputs.docs-directory }}

build-pip:
if: inputs.pip-install-target != ''
runs-on: ubuntu-latest
Expand All @@ -86,5 +83,17 @@ jobs:
- run: make ${{ inputs.make-target }}
working-directory: ${{ inputs.docs-directory }}

- run: make linkcheck
linkcheck:
if: inputs.pip-install-target != ''
Comment on lines +86 to +87
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

This prevents linkcheck from running on conda-based build environments. It should be split into linkcheck-conda and linkcheck-pip.

Another approach would be what @tsibley proposed in #28 (review). This would allow for a single job to handle both conda and pip, but it's more complex:

My idea had been to make this workflow read the RTD config file and install what's configured there, which I still think would be nicer, but it's more complex.

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

This prevents linkcheck from running on conda-based build environments. It should be split into linkcheck-conda and linkcheck-pip.

I don't see the utility of running the exact same linkcheck process twice — that's just going to cause additional fails due to random network glitches.

In what scenario does a link resolve in the conda build and fail to resolve in the pip build, or vice versa?

Copy link
Member

@victorlin victorlin Sep 4, 2024

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

build-conda and build-pip are meant to be mutually exclusive, and the same would go for linkcheck-conda/linkcheck-pip. This is not checked in the workflow because it's reasonable to assume that a docs project will use only one. See GitHub query org:nextstrain nextstrain/.github/.github/workflows/docs-ci.yaml: some invocations specify environment-file while others specify pip-install-target.

runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v4
with:
repository: ${{ inputs.repo }}

- run: pip install '${{ inputs.pip-install-target }}'

- id: linkcheck
run: make linkcheck
working-directory: ${{ inputs.docs-directory }}
continue-on-error: true