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:
6
.github/workflows/testing.yml
vendored
6
.github/workflows/testing.yml
vendored
@@ -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
30
test-doc.sh
vendored
@@ -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
|
||||
|
||||
1
tests-requirements.txt
vendored
1
tests-requirements.txt
vendored
@@ -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'
|
||||
Reference in New Issue
Block a user