mirror of
https://github.com/deadc0de6/dotdrop.git
synced 2026-02-10 10:59:16 +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
|
uses: actions/setup-python@v4
|
||||||
with:
|
with:
|
||||||
python-version: ${{ matrix.python-version }}
|
python-version: ${{ matrix.python-version }}
|
||||||
- name: Setup Node
|
|
||||||
uses: actions/setup-node@v1
|
|
||||||
with:
|
|
||||||
node-version: '16'
|
|
||||||
- name: Install dependencies
|
- name: Install dependencies
|
||||||
run: |
|
run: |
|
||||||
python -m pip install --upgrade pip
|
python -m pip install --upgrade pip
|
||||||
pip install -r tests-requirements.txt
|
pip install -r tests-requirements.txt
|
||||||
pip install -r 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
|
- name: Run sequential tests
|
||||||
run: |
|
run: |
|
||||||
./tests.sh
|
./tests.sh
|
||||||
|
|||||||
30
test-doc.sh
vendored
30
test-doc.sh
vendored
@@ -2,18 +2,34 @@
|
|||||||
# author: deadc0de6 (https://github.com/deadc0de6)
|
# author: deadc0de6 (https://github.com/deadc0de6)
|
||||||
# Copyright (c) 2022, deadc0de6
|
# Copyright (c) 2022, deadc0de6
|
||||||
|
|
||||||
## test the doc with remark
|
## test the doc with linkcheckMarkdown
|
||||||
## https://github.com/remarkjs/remark-validate-links
|
## pip install --user linkcheckmd
|
||||||
set +e
|
set +e
|
||||||
which remark >/dev/null 2>&1
|
which linkcheckMarkdown >/dev/null 2>&1
|
||||||
r="$?"
|
r="$?"
|
||||||
set -e
|
set -e
|
||||||
if [ "$r" != "0" ]; then
|
if [ "$r" != "0" ]; then
|
||||||
echo "[WARNING] install \"remark\" to test the doc"
|
echo "[ERROR] install \"linkcheckMarkdown\" to test for dead links"
|
||||||
else
|
exit 1
|
||||||
remark -f -u validate-links docs/
|
|
||||||
remark -f -u validate-links *.md
|
|
||||||
fi
|
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
|
### test the doc with markdown-link-check
|
||||||
### https://github.com/tcort/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'
|
pylint; python_version > '3.5'
|
||||||
halo; python_version > '3.5'
|
halo; python_version > '3.5'
|
||||||
distro; python_version > '3.5'
|
distro; python_version > '3.5'
|
||||||
|
linkcheckmd; python_version > '3.5'
|
||||||
Reference in New Issue
Block a user