File tree 2 files changed +9
-4
lines changed
2 files changed +9
-4
lines changed Original file line number Diff line number Diff line change 53
53
run : time catchsegv python -m backtesting.test
54
54
55
55
- if : matrix.test-type == 'docs'
56
- run : time catchsegv doc/build.sh
56
+ run : time catchsegv bash doc/build.sh
Original file line number Diff line number Diff line change 71
71
echo ' Testing for broken links'
72
72
echo
73
73
pushd " $BUILDROOT " > /dev/null
74
+ tree .
74
75
WEBSITE=' https://kernc\.github\.io/backtesting\.py'
75
76
grep -PR ' <a .*?href=' |
76
77
sed -E " s/:.*?<a .*?href=([\" '])(.*?)/\t\2/g" |
77
78
tr " \" '" ' #' |
78
79
cut -d' #' -f1 |
79
80
sort -u -t$' \t ' -k 2 |
80
81
sort -u |
82
+ tee >( cat 1>&2 ) |
81
83
python -c '
82
84
import sys
83
85
from urllib.parse import urljoin
@@ -90,9 +92,12 @@ for line in sys.stdin.readlines():
90
92
grep -v $' \t ' ' $' |
91
93
while read -r line; do
92
94
while IFS=$' \t ' read -r file url; do
93
- url=$( python -c ' import html, sys; print(html.unescape(sys.argv[-1]))' " $url " )
94
- [ -f " $url " ] ||
95
- curl --silent --fail --retry 5 --retry-delay 5 --user-agent ' Mozilla/5.0 Firefox 61' " $url " > /dev/null 2>&1 ||
95
+ target_file=" $( python -c ' import html, sys; print(html.unescape(sys.argv[-1]))' " $url " ) "
96
+ echo " $target_file "
97
+ if [ -f " $target_file " ]; then continue ; fi
98
+
99
+ url=" ${url// /% 20} "
100
+ curl --silent --fail --retry 5 --retry-delay 5 --user-agent ' Mozilla/5.0 Firefox 61' " $url " > /dev/null 2>&1 ||
96
101
die " broken link in $file : $url "
97
102
done
98
103
done
You can’t perform that action at this time.
0 commit comments