1313 uses : actions/checkout@v4
1414 - uses : xu-cheng/texlive-action@v2
1515 with :
16- scheme : full # Consider changing to 'basic' or 'medium' if possible
16+ scheme : full # Consider changing to 'basic' or 'medium' if possible
1717 run : |
1818 apk add make
1919 apk add g++
@@ -40,41 +40,18 @@ jobs:
4040 - name : Install pdfgrep
4141 run : sudo apt-get update && sudo apt-get install -y pdfgrep
4242
43- - name : Extract and Check URLs
44- run : |
45- urls=$(pdfgrep -o -P 'https?:\/\/(www\.)?[-a-zA-Z0-9@:%._\+~#=]{1,256}\.[a-zA-Z0-9()]{1,6}\b([-a-zA-Z0-9()@:%_\+.~#?&//=]*)' vorkurs.pdf | sort -u)
46- error_count=0
43+ - name : Install required python package
44+ run : pip install urllib3
4745
48- for url in $urls; do
49- echo "Checking URL: $url"
46+ - name : Run Link Checker
47+ run : python .github/workflows/test_scripts/check_links.py
5048
51- if [[ ! "$url" =~ ^https:// ]]; then
52- echo "ERROR: URL is not HTTPS: $url"
53- error_count=$((error_count + 1))
54- continue
55- fi
56-
57- if ! curl -Isf --fail-early --connect-timeout 10 "$url" > /dev/null 2>&1; then
58- curl_error=$(curl -Isf --fail-early --connect-timeout 10 "$url" 2>&1 > /dev/null)
59- if [[ $curl_error == *"Failed to connect"* ]]; then
60- echo "ERROR: Connection failed: $url"
61- elif [[ $curl_error == *"Could not resolve host"* ]]; then
62- echo "ERROR: DNS resolution failed: $url"
63- elif [[ $curl_error == *"SSL certificate problem"* ]]; then
64- echo "ERROR: Initial SSL certificate problem: $url"
65- else
66- echo "ERROR: Failed to access: $url (curl error: $curl_error)"
67- fi
68- if ! openssl s_client -connect "$(echo "$url" | sed 's/https\?:\/\///' | cut -d/ -f1):443" -servername "$(echo "$url" | sed 's/https\?:\/\///' | cut -d/ -f1)" 2>/dev/null </dev/null | openssl x509 -noout; then
69- echo " -> CERTIFICATE ERROR DETECTED!"
70- fi
71-
72- error_count=$((error_count + 1))
73- fi
74- done
49+ check-compilability :
50+ runs-on : ubuntu-latest
51+ needs : build
52+ steps :
53+ - name : Checkout code
54+ uses : actions/checkout@v4
7555
76- if [ "$error_count" -gt 0 ]; then
77- echo "::error::Found $error_count broken or insecure links!"
78- exit 1
79- fi
80- shell : bash
56+ - name : Run compilability checker
57+ run : python .github/workflows/test_scripts/check_compilability.py
0 commit comments