diff --git a/docker-bake.hcl b/docker-bake.hcl index e6741878..2b7f25d6 100644 --- a/docker-bake.hcl +++ b/docker-bake.hcl @@ -111,3 +111,9 @@ target "docs-image" { output = ["type=docker"] tags = ["registry-docs:local"] } + +target "docs-test" { + inherits = ["_common_docs"] + target = "test" + output = ["type=cacheonly"] +} diff --git a/dockerfiles/docs.Dockerfile b/dockerfiles/docs.Dockerfile index 8b31345b..4d351b69 100644 --- a/dockerfiles/docs.Dockerfile +++ b/dockerfiles/docs.Dockerfile @@ -26,3 +26,10 @@ EXPOSE 1313 FROM scratch AS out COPY --from=build /out / + +FROM wjdp/htmltest:v0.17.0 AS test +WORKDIR /test +COPY --from=build /out ./public +ADD docs/.htmltest.yml .htmltest.yml +RUN --mount=type=cache,target=tmp/.htmltest \ + htmltest diff --git a/docs/.htmltest.yml b/docs/.htmltest.yml new file mode 100644 index 00000000..d02699b4 --- /dev/null +++ b/docs/.htmltest.yml @@ -0,0 +1,9 @@ +DirectoryPath: "public" +EnforceHTTPS: true +CheckDoctype: true +CheckExternal: true +IgnoreAltMissing: true +IgnoreAltEmpty: true +IgnoreEmptyHref: true +IgnoreInternalEmptyHash: true +IgnoreDirectoryMissingTrailingSlash: true