disable link check outside CI

This commit is contained in:
Damien Elmes 2021-07-23 20:18:20 +10:00
parent e1f9d0fc1b
commit b1dedb1b1f
2 changed files with 7 additions and 2 deletions

View file

@ -26,7 +26,7 @@ test --test_output=errors
# don't add empty __init__.py files
build --incompatible_default_to_explicit_init_py
build:ci --show_timestamps --isatty=0 --color=yes --show_progress_rate_limit=5
build:ci --show_timestamps --isatty=0 --color=yes --show_progress_rate_limit=5 --action_env=ANKI_CI=1
build:opt -c opt
# the TypeScript workers on Windows choke when deps are changed while they're

View file

@ -35,7 +35,7 @@ impl HelpPage {
#[cfg(test)]
mod test {
use std::iter;
use std::{env, iter};
use futures::StreamExt;
use itertools::Itertools;
@ -59,6 +59,11 @@ mod test {
#[tokio::test]
async fn check_links() {
if env::var("ANKI_CI").is_err() {
println!("Skip, ANKI_CI not set.");
return;
}
let ctx = BasicContext::default();
let result = futures::stream::iter(HelpPage::iter())
.map(|page| check_page(page, &ctx))