From 3765b11e78e01f463171ead6892a2b7d8a2ddda2 Mon Sep 17 00:00:00 2001 From: garethahealy Date: Fri, 9 Aug 2019 15:08:32 +0100 Subject: [PATCH] Added markdown-link-check to travis to highlight any deadlinks --- .travis.yml | 10 ++++++++++ linkcheck-config.json | 7 +++++++ 2 files changed, 17 insertions(+) create mode 100644 linkcheck-config.json diff --git a/.travis.yml b/.travis.yml index 3e1f46747..85cd2004c 100644 --- a/.travis.yml +++ b/.travis.yml @@ -3,6 +3,12 @@ language: python python: - "3.7" +addons: + apt: + packages: + - nodejs + - npm + cache: directories: - $HOME/.cache/pip @@ -23,8 +29,12 @@ install: #- pip install "ansible-lint<4.0" yamllint flake8 molecule docker "pytest<3.10" "testinfra==3.0.4" # Configure OpenShift Binary - sudo wget -qO- ${OC_BINARY_URL} | sudo tar -xvz -C /bin + # Install hyperlink checker + - npm install -g markdown-link-check before_script: + # Check for dead-links in the docs + - find . -type f -name "*.md" -exec markdown-link-check --quiet --config linkcheck-config.json {} \; # Configure Docker - sudo service docker stop - sudo mkdir -p /etc/docker diff --git a/linkcheck-config.json b/linkcheck-config.json new file mode 100644 index 000000000..0d17874e9 --- /dev/null +++ b/linkcheck-config.json @@ -0,0 +1,7 @@ +{ + "ignorePatterns": [ + { + "pattern": ".*.apps.example.com\/.*" + } + ] +}