1
0
mirror of https://github.com/deadc0de6/dotdrop.git synced 2026-02-04 15:39:43 +00:00

change dead link check tool

This commit is contained in:
deadc0de6
2023-01-18 07:08:00 +01:00
parent 3127e30877
commit b3e79da7f9
3 changed files with 25 additions and 14 deletions

View File

@@ -12,17 +12,11 @@ jobs:
uses: actions/setup-python@v4
with:
python-version: ${{ matrix.python-version }}
- name: Setup Node
uses: actions/setup-node@v1
with:
node-version: '16'
- name: Install dependencies
run: |
python -m pip install --upgrade pip
pip install -r tests-requirements.txt
pip install -r requirements.txt
npm install -g remark-cli remark-validate-links
npm install -g markdown-link-check
- name: Run sequential tests
run: |
./tests.sh

30
test-doc.sh vendored
View File

@@ -2,18 +2,34 @@
# author: deadc0de6 (https://github.com/deadc0de6)
# Copyright (c) 2022, deadc0de6
## test the doc with remark
## https://github.com/remarkjs/remark-validate-links
## test the doc with linkcheckMarkdown
## pip install --user linkcheckmd
set +e
which remark >/dev/null 2>&1
which linkcheckMarkdown >/dev/null 2>&1
r="$?"
set -e
if [ "$r" != "0" ]; then
echo "[WARNING] install \"remark\" to test the doc"
else
remark -f -u validate-links docs/
remark -f -u validate-links *.md
echo "[ERROR] install \"linkcheckMarkdown\" to test for dead links"
exit 1
fi
find . -type f -iname '*.md' | while read line; do
echo "checking links in \"${line}\""
linkcheckMarkdown ${line}
done
### test the doc with remark
### https://github.com/remarkjs/remark-validate-links
#set +e
#which remark >/dev/null 2>&1
#r="$?"
#set -e
#if [ "$r" != "0" ]; then
# echo "[WARNING] install \"remark\" to test the doc"
#else
# remark -f -u validate-links docs/
# remark -f -u validate-links *.md
#fi
### test the doc with markdown-link-check
### https://github.com/tcort/markdown-link-check

View File

@@ -6,3 +6,4 @@ pyflakes; python_version > '3.5'
pylint; python_version > '3.5'
halo; python_version > '3.5'
distro; python_version > '3.5'
linkcheckmd; python_version > '3.5'