test: automate determining non-en locales for broken-link-checker test to ignore 🌋#719
Merged
darcywong00 merged 5 commits intomasterfrom May 6, 2026
Merged
test: automate determining non-en locales for broken-link-checker test to ignore 🌋#719darcywong00 merged 5 commits intomasterfrom
darcywong00 merged 5 commits intomasterfrom
Conversation
User Test ResultsTest specification and instructions User tests are not required |
darcywong00
commented
May 6, 2026
| set +e | ||
| set +o pipefail | ||
| npx broken-link-checker http://localhost:8053/_test --recursive --ordered ---host-requests 50 -e --filter-level 3 --exclude '*/donate' --exclude '*lang=*' | tee blc.log | ||
| node blc_test.mjs | tee ../blc.log |
Contributor
Author
There was a problem hiding this comment.
An alternative (less drastic) way may be to use BASH to generate the list of excludes
like
Suggested change
| node blc_test.mjs | tee ../blc.log | |
| # determine non-en locales to ignore | |
| readarray -t ignoresArray <<< $(find ./_includes/locale/strings/keyboards/ -maxdepth 1 -name '*.php' ! -name "en.php" \ | |
| -execdir basename {} .php ';') | |
| local baseURL="http://localhost:8053" | |
| local ignoreStr=() | |
| for locale in "${ignoresArray[@]}"; do | |
| ignoreStr+=" --exclude ${baseURL}/$locale/*" | |
| done | |
| # echo "ignoreStr: ${ignoreStr[@]}" | |
| npx broken-link-checker ${baseURL}/_test --recursive --ordered ---host-requests 50 -e --filter-level 3 ${ignoreStr} | tee blc.log |
Member
There was a problem hiding this comment.
Yep, I reckon this would be easier for now but I think the .mjs would be more maintainable long-term. Not sure if we have bandwidth to complete the long-term approach.
(Another area we could exclude is the /downloads/releases for every single release)
* revert blc_test.mjs changes * update build.sh and ci.yml to use bash for determining non-en locales and /downloads/releases to ignore
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Addresses #712 (comment)
I'm applying to the base branch master so we can compare the CI link checker to existing runs
This passing run took 13m 23s after skipping /downloads/releases
The one for #979 took 26m 49s
This updates ci.yml and build.sh to determine the list of non-en locales to ignore (along with /downloads/releases) for the broken-link-checker CLI to run.
Test-bot: skip