Skip to content

Commit

Permalink
added test for ALL
Browse files Browse the repository at this point in the history
  • Loading branch information
athalhammer committed Oct 6, 2023
1 parent 5198709 commit 779b522
Show file tree
Hide file tree
Showing 3 changed files with 12 additions and 7 deletions.
1 change: 1 addition & 0 deletions .github/workflows/tests.yml
Original file line number Diff line number Diff line change
Expand Up @@ -32,6 +32,7 @@ jobs:
- name: Run on small live graphs
run: |
./danker.sh ch
./danker.sh ALL -p test -i 3
./danker.sh sk --project wikisource
./danker.sh cv --project wikibooks
./danker.sh th --project wikinews
Expand Down
2 changes: 1 addition & 1 deletion script/create_links.sh
Original file line number Diff line number Diff line change
Expand Up @@ -80,7 +80,7 @@ fi

project="$2"
# default to wiki project
if [ ! "$2" ]; then
if [ ! "$2" ] || [ "$2" = "test" ]; then
project="wiki"
fi
wiki="$1$project"
Expand Down
16 changes: 10 additions & 6 deletions script/get_languages.sh
Original file line number Diff line number Diff line change
Expand Up @@ -22,7 +22,7 @@

declare -A WIKIS
WIKIS=( ["wiki"]="wp" ["wikibooks"]="wb" ["wikisource"]="ws" ["wikiversity"]="wv"
["wikinews"]="wn" ["wiktionary"]="wt" ["wikiquote"]="wq")
["wikinews"]="wn" ["wiktionary"]="wt" ["wikiquote"]="wq" ["test"]="test")

# default is normal Wikipedia (wp)
project="wp"
Expand All @@ -35,11 +35,15 @@ if [ ! "$project" ]; then
exit 1
fi

result=$(curl --retry-connrefused --retry 5 --retry-delay 60 -s "https://wikistats.wmcloud.org/display.php?t=$project" \
| sed -n 's;\(.*text\)\{2\}.*>\(.*\)</a>.*;\2;p' `# Parse wiki names` \
| sed "s/-/_/g" `# Replace "-" with "_"` \
| sed "s/be_tarask/be_x_old/" `# Manual fix for be_x_old` \
| sort)
if [ "$project" = "test" ]; then
result=$(printf "anp\nch\nmad\nty\n")
else
result=$(curl --retry-connrefused --retry 5 --retry-delay 60 -s "https://wikistats.wmcloud.org/display.php?t=$project" \
| sed -n 's;\(.*text\)\{2\}.*>\(.*\)</a>.*;\2;p' `# Parse wiki names` \
| sed "s/-/_/g" `# Replace "-" with "_"` \
| sed "s/be_tarask/be_x_old/" `# Manual fix for be_x_old` \
| sort)
fi

# ensure proper exit code
if [ "$result" ]; then
Expand Down

0 comments on commit 779b522

Please sign in to comment.