mirror of
https://github.com/ankitects/anki.git
synced 2025-09-18 14:02:21 -04:00
disable link check outside CI
This commit is contained in:
parent
e1f9d0fc1b
commit
b1dedb1b1f
2 changed files with 7 additions and 2 deletions
2
.bazelrc
2
.bazelrc
|
@ -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
|
||||
|
|
|
@ -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))
|
||||
|
|
Loading…
Reference in a new issue