Skip to content

Commit

Permalink
ci: Add Markdown link checker to code quality workflow (#44)
Browse files Browse the repository at this point in the history
# Pull Request

## Description

This change introduces a new workflow to check Markdown links in the repository. The key updates include:

1. Added a new configuration file `.github/other-configurations/.linkspector.yml` for the link checking tool. This file specifies:
   - Directories to scan: root and docs
   - Files to exclude: CHANGELOG.md
   - Acceptable HTTP status code: 200

2. Updated the `.github/workflows/code-quality.yml` file to include a new job called "Check Markdown links". This job:
   - Uses the UmbrellaDocs/[email protected] action
   - Configures the action with the newly added .linkspector.yml file
   - Sets up GitHub PR review reporting
   - Fails the workflow if any broken links are found

This addition will help maintain the integrity of documentation and references throughout the project by automatically checking for broken links in Markdown files.

fixes #40
  • Loading branch information
JackPlowman authored Sep 28, 2024
1 parent 9fe1308 commit 7da3500
Show file tree
Hide file tree
Showing 2 changed files with 25 additions and 0 deletions.
7 changes: 7 additions & 0 deletions .github/other-configurations/.linkspector.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,7 @@
dirs:
- ./
- ./docs
excludedFiles:
- ./CHANGELOG.md
aliveStatusCodes:
- 200
18 changes: 18 additions & 0 deletions .github/workflows/code-quality.yml
Original file line number Diff line number Diff line change
Expand Up @@ -71,6 +71,24 @@ jobs:
- name: Check Python Code for Dead Code (Vulture)
run: just vulture

check-markdown-links:
name: Check Markdown links
runs-on: ubuntu-latest
steps:
- name: Checkout Repository
uses: actions/checkout@v4
with:
fetch-depth: 0

- name: Check Markdown links
uses: UmbrellaDocs/[email protected]
with:
github_token: ${{ secrets.GH_TOKEN }}
config_file: .github/other-configurations/.linkspector.yml
reporter: github-pr-review
fail_on_error: true
filter_mode: nofilter

check-justfile-format:
name: Check Justfile Format
runs-on: ubuntu-latest
Expand Down

0 comments on commit 7da3500

Please sign in to comment.