Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Add nightly link checking #366

Open
mrjones-plip opened this issue Nov 3, 2020 · 4 comments
Open

Add nightly link checking #366

mrjones-plip opened this issue Nov 3, 2020 · 4 comments
Assignees

Comments

@mrjones-plip
Copy link
Contributor

mrjones-plip commented Nov 3, 2020

Now that we've removed per commit link checking on PRs, we should add nightly link checking on the entire repo. This will enable us to catch link rot overtime. In the original link checker effort (see #259), we used muffet. This is still a good tool! We should just run them on a schedule with something like:

on:
  schedule:
    # * is a special character in YAML so you have to quote this string
    # this example runs at 3:15am every day:
    - cron:  '15 3 * * *'

What we have right now runs on every push:

on:
  push:
    branches:
      - '*' # branch checking is below so all this is one CI file

And then we check for if we're on master or not to only run certain parts of the CI workflow:

- name: Master Branch Only - Deploy to GH pages
   if: ${{ github.ref == 'refs/heads/master' }}

Check out the resulting PR from #367 as that will show what we need to add back in to the nightly runs.

@mrjones-plip
Copy link
Contributor Author

This is what I yanked out of ci.yml in #365 :

      # Pinning to current version as of Aug 3, 2020 for stability
      - name: All Branches - Install Go v1.14
        uses: actions/setup-go@v2
        with:
          go-version: '1.14'

      # Pinning to current version as of Aug 3, 2020 for stability
      - name: All Branches - Install Muffet v1.3.3
        run: env GO111MODULE="on" go get github.com/raviqqe/[email protected]

      # run in background so CI doesn't hang waiting for "ctrl + c".  Sleep so hugo server is ready
      - name: All Branches - Serve Hugo site
        run: |
          hugo server&
          sleep 5

      - name: All Branches - Run Muffet link checker
        shell: bash
        run: ./.github/scripts/muffet.sh

@mrjones-plip
Copy link
Contributor Author

When ever this gets tended to, we should likely refactor the filenames so that they're logical. Maybe move ci.yml to be branch-checks.yml and the new one is nightly-link-check.yml or something? Just make it logical ;)

@mrjones-plip
Copy link
Contributor Author

@MaxDiz and @abbyad - while i've actively yanked out link checking becaues it's blocked some folks from merging PRs - I'm letting this one naturally fall into when ever we want to schedule it.

@mrjones-plip
Copy link
Contributor Author

a helpful not from @nomulex which I agree with:

For the link checker nightly build, we may need to put it retry logic for those links that work on retry , also if it fails say 3 times we need to have a way to alert those that are concerned.

@mrjones-plip mrjones-plip self-assigned this Apr 27, 2022
mrjones-plip added a commit that referenced this issue Apr 27, 2022
mrjones-plip added a commit that referenced this issue Apr 28, 2022
* Add nighlty link checks per #366

* test schedule

* comment out schedule for now, switch master -> main

* switch master -> main x2

* second schedule test

* third schedule test

* switch over to real schedule
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant