0.0.8 • Published 5 years ago

dvc-github-actions-link-checker v0.0.8

Weekly downloads
-
License
MIT
Repository
-
Last release
5 years ago

DVC Link Checker

This project is a small CI tool built for the DVC website that checks the current HEAD's diff compared to origin/master, and then sends a request to each one to make sure the links are valid.

The base library has two frontends compiled with Rollup: a GitHub Actions driver and a CLI driver.

GitHub Actions

Since GitHub actions code is delivered through git repos, this repo uses Git Submodules to minimize the required payload of cloning the precompiled JS blob.

You can use yarn build to compile the sources, then cd into action to push to the production repo for updates.

CLI

The CLI runner is provided through this project's NPM package.

To use the CLI runner, install dvc-github-actions-link-checker and then invoke the link-check-git-diff binary.

yarn add -D dvc-github-actions-link-checker
yarn run link-check-git-diff

Also, the base URL that root-relative links are checked against can be overridden with the environment variable CHECK_LINKS_BASE_URL. The default without this variable is "https://dvc.org". The script calls dotenv, so that can also be used for convenience.

The script always exits with 0 by default, but if the environment variable CHECK_LINKS_FAILURE_EXIT_CODE is set to anything truthy, a failing test will trigger an exit code of 1. This only matters for CI for the most part.

0.0.8

5 years ago

0.0.7

5 years ago

0.0.6

5 years ago

0.0.5

5 years ago

0.0.4

5 years ago

0.0.3

5 years ago

0.0.2

5 years ago

0.0.1

5 years ago