mirror of
https://github.com/deadc0de6/dotdrop.git
synced 2026-02-04 16:49:42 +00:00
gh action env vars
This commit is contained in:
2
.github/workflows/test-doc.yml
vendored
2
.github/workflows/test-doc.yml
vendored
@@ -19,6 +19,6 @@ jobs:
|
|||||||
python -m pip install --upgrade pip
|
python -m pip install --upgrade pip
|
||||||
pip install -r tests-requirements.txt
|
pip install -r tests-requirements.txt
|
||||||
npm install -g remark-cli remark-validate-links
|
npm install -g remark-cli remark-validate-links
|
||||||
- name: Run with 1 worker
|
- name: Check the doc
|
||||||
run: |
|
run: |
|
||||||
./scripts/check-doc.sh
|
./scripts/check-doc.sh
|
||||||
|
|||||||
20
scripts/check-doc.sh
vendored
20
scripts/check-doc.sh
vendored
@@ -12,17 +12,17 @@ find . -type f -iname '*.md' | while read -r line; do
|
|||||||
./scripts/check_links.py "${line}"
|
./scripts/check_links.py "${line}"
|
||||||
done
|
done
|
||||||
|
|
||||||
## test the doc internal links
|
in_cicd="${GITHUB_WORKFLOW:-}"
|
||||||
## https://github.com/remarkjs/remark-validate-links
|
|
||||||
## https://github.com/tcort/markdown-link-check
|
|
||||||
## npm install -g remark-cli remark-validate-links
|
|
||||||
if ! which remark >/dev/null 2>&1; then
|
|
||||||
echo "[WARNING] install \"remark\" to test the doc"
|
|
||||||
exit 1
|
|
||||||
fi
|
|
||||||
|
|
||||||
in_cicd="${GH_WORKFLOW:-}"
|
|
||||||
if [ -n "${in_cicd}" ]; then
|
if [ -n "${in_cicd}" ]; then
|
||||||
|
## test the doc internal links when in CI/CD
|
||||||
|
## https://github.com/remarkjs/remark-validate-links
|
||||||
|
## https://github.com/tcort/markdown-link-check
|
||||||
|
## npm install -g remark-cli remark-validate-links
|
||||||
|
if ! which remark >/dev/null 2>&1; then
|
||||||
|
echo "[WARNING] install \"remark\" to test the doc"
|
||||||
|
exit 1
|
||||||
|
fi
|
||||||
|
|
||||||
echo "------------------------"
|
echo "------------------------"
|
||||||
echo "checking internal links"
|
echo "checking internal links"
|
||||||
find . -type f -iname '*.md' | while read -r line; do
|
find . -type f -iname '*.md' | while read -r line; do
|
||||||
|
|||||||
4
tests.sh
vendored
4
tests.sh
vendored
@@ -6,10 +6,10 @@
|
|||||||
set -eu -o errtrace -o pipefail
|
set -eu -o errtrace -o pipefail
|
||||||
|
|
||||||
cur=$(cd "$(dirname "${0}")" && pwd)
|
cur=$(cd "$(dirname "${0}")" && pwd)
|
||||||
in_cicd="${GH_WORKFLOW:-}"
|
in_cicd="${GITHUB_WORKFLOW:-}"
|
||||||
|
|
||||||
# patch TERM var in ci/cd
|
|
||||||
if [ -n "${in_cicd}" ]; then
|
if [ -n "${in_cicd}" ]; then
|
||||||
|
# patch TERM var in ci/cd
|
||||||
if [ -z "${TERM}" ]; then
|
if [ -z "${TERM}" ]; then
|
||||||
export TERM="linux"
|
export TERM="linux"
|
||||||
fi
|
fi
|
||||||
|
|||||||
Reference in New Issue
Block a user