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

Fix link checking in CI #426

Closed
wants to merge 1 commit into from
Closed

Fix link checking in CI #426

wants to merge 1 commit into from

Conversation

sdruskat
Copy link
Member

Related issues

Fixes #425

Describe the changes made in this pull request

Review checklist

  • Please check if the pull request is against the correct branch
    (format/schema/semantic documentation changes: develop; typos, meta files, etc.: main)
  • Please check if all changes are recorded in CHANGELOG.md and adapt if necessary.
  • Please run tests locally.
cd $(mktemp -d --tmpdir cff.XXXXXX)
git clone https://github.com/citation-file-format/citation-file-format .
git checkout fix-link-checking
python3 -m venv env
source env/bin/activate
pip install --upgrade pip wheel setuptools
pip install -r requirements.txt
pytest
<do other things>
  • Check if link checker in CI passes

- Introduce a workaround for link checking failing on docs.github.com URLs, see gaurav-nelson/github-action-markdown-link-check#136 (comment).
@sdruskat
Copy link
Member Author

@sdruskat sdruskat marked this pull request as ready for review December 14, 2022 08:01
@sdruskat sdruskat requested a review from jspaaks December 14, 2022 08:01
@jspaaks
Copy link
Member

jspaaks commented Jul 5, 2023

Nice, good to see the links checker workflow green. When I tried this out locally, I noticed 3 things:

  1. I'd like to add a README.dev.md with technical stuff about the repo, how to set up tools, what the philosopy of testing/examples is, how to run the tests, how to run the link checker locally, how to prepare making a release, etc. I can't find this kind of information anywhere at the moment, probably because we had high hopes of keeping this repo small :).

  2. some links in the schema-guide.md are incorrect (not due to this PR, but it seems it just went unnoticed so far), specifically I found problems with:

    npm install --save-dev markdown-link-check
    ./node_modules/markdown-link-check/markdown-link-check --progress README.md schema-guide.md
    
    # (some output omitted)
    
      178 links checked.
    
      ERROR: 3 dead links found!
      [✖] #yaml-strings → Status: 404      (page source suggests the anchor name is user-content-yaml-strings)
      [✖] #definitions.license-enum → Status: 404    (github removes dot from anchor)
      [✖] #definitioncountry → Status: 404    (definitions plural)
    

    Not sure why the link checker on GitHub didn't find these problematic.

  3. The tool that gaurav/nelson uses (https://github.com/tcort/markdown-link-check) also comes as a pre-commit hook. We could add it to the repo and describe how to make use of it in README.dev.md

Let me know what you think of this, I can spawn issues as needed.

@sdruskat
Copy link
Member Author

sdruskat commented Jul 6, 2023

Closing as fixed in #424, spawned #446 and #447.

@sdruskat sdruskat closed this Jul 6, 2023
@sdruskat sdruskat deleted the fix-link-checking branch July 10, 2023 07:58
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

Link check action fails for GitHub Docs URLs
2 participants