diff --git a/.github/scripts/muffet.sh b/.github/scripts/muffet.sh index 2566a8d0e..a2eed0d5a 100755 --- a/.github/scripts/muffet.sh +++ b/.github/scripts/muffet.sh @@ -14,35 +14,38 @@ # download.docker.com are excluded below) you can add additional sites as needed. Please # use extremely granular URLs so as not to exclude more than we need to. -muffet http://localhost:1313 \ +muffet http://localhost:1313/ \ + --dns-resolver 192.168.68.20:53 \ --buffer-size 50000 \ --timeout 35 \ - --concurrency 2 \ + --max-connections 2 \ --ignore-fragments \ - --exclude "http[s]*://github.com/medic/.*/issues/new*" \ - --exclude "http[s]*://github.com/medic/.*/commit*" \ - --exclude "http[s]*://github.com/medic/cht-docs/edit/main*" \ - --exclude "http[s]*://github.com/medic/medic-infrastructure*" \ - --exclude "http[s]*://github.com/moh-kenya/config-echis-2.0*" \ - --exclude "http[s]*://docs.google.com/spreadsheets/d/12345ABCDEF*" \ - --exclude "http[s]*://docs.google.com/document/d/14AuJ7SerLuOPESBjQlJqpBtzwSAoVf5ykTT7fjyJBT0*" \ - --exclude "http[s]*://drive.google.com/file/d/1YPXoba9gVmD7SP-X88PpJIsIVGvY86_G*" \ - --exclude "http[s]*://tools.google.com*" \ - --exclude "http[s]*://www.tableau.com*" \ + --exclude "http[s]*://github.com/medic/.*/issues/new.*" \ + --exclude "http[s]*://github.com/medic/.*/commit.*" \ + --exclude "http[s]*://github.com/medic/cht-docs/edit/main.*" \ + --exclude "http[s]*://github.com/medic/medic-infrastructure.*" \ + --exclude "http[s]*://github.com/moh-kenya/config-echis-2.0.*" \ + --exclude "http[s]*://docs.google.com/spreadsheets/d/12345ABCDEF.*" \ + --exclude "http[s]*://docs.google.com/document/d/14AuJ7SerLuOPESBjQlJqpBtzwSAoVf5ykTT7fjyJBT0.*" \ + --exclude "http[s]*://drive.google.com/file/d/1YPXoba9gVmD7SP-X88PpJIsIVGvY86_G.*" \ + --exclude "http[s]*://tools.google.com.*" \ + --exclude "http[s]*://www.tableau.com.*" \ --exclude "http[s]*://doi.org/10.1080/02681102.2019.1667289" \ --exclude "http[s]*://journals.sagepub.com/doi/full/10.1177/20552076231194924" \ - --exclude "http[s]*://garticphone.com*" \ - --exclude "http[s]*://www.hl7.org*" \ - --exclude "http[s]*://demo.app.medicmobile.org*" \ + --exclude "http[s]*://garticphone.com.*" \ + --exclude "http[s]*://www.hl7.org.*" \ + --exclude "http[s]*://demo.app.medicmobile.org.*" \ --exclude "http[s]*://www.npmjs.com/org/medic/team/developers" \ - --exclude "http[s]*://docs.couchdb.org*" \ - --exclude "http[s]*://oppiamobile.readthedocs.io*" \ - --exclude "http[s]*://africastalking.com*" \ - --exclude "http[s]*://borgbackup.readthedocs.io*" \ - --exclude "http[s]*://udemy.com*" \ - --exclude "http[s]*://udacity.com*" \ - --exclude "http[s]*://.*my.local-ip.co*" \ - --exclude "http[s]*://.*local-ip.medicmobile.org*" \ - --exclude "http[s]*://cht.domain.com*" \ - --exclude "http[s]*://localhost*" \ - --exclude "http[s]*://127.*" + --exclude "http[s]*://docs.couchdb.org.*" \ + --exclude "http[s]*://oppiamobile.readthedocs.io*." \ + --exclude "http[s]*://africastalking.com.*" \ + --exclude "http[s]*://borgbackup.readthedocs.io.*" \ + --exclude "http[s]*://udemy.com.*" \ + --exclude "http[s]*://udacity.com.*" \ + --exclude "http[s]*://.*my.local-ip.co.*" \ + --exclude "http[s]*://.*local-ip.medicmobile.org.*" \ + --exclude "http[s]*://cht.domain.com.*" \ + --exclude "http[s]*://localhost:5.*" \ + --exclude "http[s]*://localhost:8.*" \ + --exclude "http[s]*://localhost$" \ + --exclude "http[s]*://127*" diff --git a/.github/scripts/set_dns.sh b/.github/scripts/set_dns.sh deleted file mode 100755 index 9f063ede4..000000000 --- a/.github/scripts/set_dns.sh +++ /dev/null @@ -1,36 +0,0 @@ -#!/bin/bash - -# At one point we had issues with the DNS server that GH CI Runners use, -# so this script was written to change Muffet to use Quad9. While Quad9 presumably -# will be a bit slower than local DNS to GH CI, it shouldn't matter as Muffet -# is run once a day and is not speed sensitive. -# -# More Info: -# - Issue: local-ip.medicmobile.org doesn't resolve on GH runners, causes -# link check errors (https://github.com/medic/cht-docs/issues/1106) -# - Quad9: 9.9.9.9 DNS Server being used (https://quad9.net) - -echo -echo "------------------------" -echo "calling: resolvectl dns eth0" -resolvectl dns eth0 - -echo -echo "------------------------" -echo "calling: dig local-ip.medicmobile.org +short" -dig local-ip.medicmobile.org +short - -echo -echo "------------------------" -echo "calling: sudo resolvectl dns eth0 9.9.9.9 149.112.112.112" -sudo resolvectl dns eth0 9.9.9.9 149.112.112.112 - -echo -echo "------------------------" -echo "calling: resolvectl dns eth0" -resolvectl dns eth0 - -echo -echo "------------------------" -echo "calling: dig local-ip.medicmobile.org +short" -dig local-ip.medicmobile.org +short diff --git a/.github/workflows/cron-check-links.yml b/.github/workflows/cron-check-links.yml index 7e3ddd1a1..953cb0a0e 100644 --- a/.github/workflows/cron-check-links.yml +++ b/.github/workflows/cron-check-links.yml @@ -35,7 +35,7 @@ jobs: - name: Install Muffet run: | - GO111MODULE=on go install github.com/raviqqe/muffet@v1.5.7 + GO111MODULE=on go install github.com/raviqqe/muffet@v2.10.6 asdf reshim golang # run in background so CI doesn't hang waiting for "ctrl + c". Sleep ensures server is ready in next step @@ -44,10 +44,6 @@ jobs: hugo server& sleep 30 - - name: Set DNS to 9.9.9.9 - shell: bash - run: ./.github/scripts/set_dns.sh - - name: Run Muffet link checker shell: bash run: ./.github/scripts/muffet.sh