Skip to content
Snippets Groups Projects
Commit 0bd11346 authored by Martyn Welch's avatar Martyn Welch
Browse files

Add URL testing as CI step


In order to ensure we are notified of broken URLs, add testing of external
URLs as a step in the CI. It is added as `allow_failure` because it would
be inapproprate to stop merges because an unrelated link has broken.

Additionally, only test when CI is run on master branch to save repeatedly
testing the URLs each time a merge request or branch is updated.

Signed-off-by: default avatarMartyn Welch <martyn.welch@collabora.com>
parent a375008c
No related branches found
No related tags found
1 merge request!267Test and fix links use in Apertis website
Pipeline #264109 passed with warnings
......@@ -2,9 +2,27 @@ variables:
GIT_SUBMODULE_STRATEGY: recursive
stages:
- test
- generate-html
- generate-pdf
test-urls:
image: debian:buster-slim
stage: test
tags:
- lightweight
before_script:
- apt update && apt install -y --no-install-recommends
python3
python3-markdown
python3-requests
script:
- scripts/test_urls.py content/
# We are running this for all commits for all URLs on the website, so it
# wouldn't be fair to block a merge due to an unrelated URL suddenly failing.
# Treat this as a warning that the site has degraded.
allow_failure: true
test-html:
image:
name: klakegg/hugo:latest
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment