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

Setup CI testing of Website Build #36

Closed
2 tasks
lwasser opened this issue Dec 12, 2019 · 14 comments
Closed
2 tasks

Setup CI testing of Website Build #36

lwasser opened this issue Dec 12, 2019 · 14 comments
Assignees
Labels
help wanted Extra attention is needed

Comments

@lwasser
Copy link
Member

lwasser commented Dec 12, 2019

Our website build should be tested each time there is a new PR. This can be done with GitHub Actions

Here is an example of how testing happens on another site that i setup

It will be easy to setup the same thing here. this is in reference to 2 recent PR's (THANK YOU AGAIN FOR THESE) from folks catching broken links @xuanxu @NickleDave

Tasks:

  • Setup a github action to build the site and catch errors
  • make sure linkchecker runs to find broken links

The build should run on all branches and PR's so that we don't merge pr's that break the site.

@lwasser lwasser added the help wanted Extra attention is needed label Dec 12, 2019
@lwasser lwasser changed the title Setup HTML Proofer for CI testing of links and such Setup HTML Proofer for CI testing of Website Build Sep 20, 2022
@lwasser lwasser changed the title Setup HTML Proofer for CI testing of Website Build Setup CI testing of Website Build Sep 20, 2022
@Athene-ai
Copy link

I am interested

@lwasser
Copy link
Member Author

lwasser commented Sep 20, 2022

that would be awesome @Athene-ai you are welcome to work on this and submit a PR to this repo if this is something that you'd like to work on. And if you need more information please say the word!

@Athene-ai
Copy link

@lwasser thanks and for sure I will take a look at this repo ;-)

@NickleDave
Copy link
Contributor

Thank you @Athene-ai!

In case it helps, this is what usrse.github.io uses to build:
https://github.com/USRSE/usrse.github.io/blob/main/.circleci/config.yml
I'm not quite sure why they build on circle.ci instead of with Actions, I wonder if it's easier to get artifacts that way?
Maybe @vsoch would know and be kind enough to give us a clue.

I also saw that jekyll provides actions:
https://jekyllrb.com/docs/continuous-integration/github-actions/
but I didn't get as far as figuring out if there's an easy way to get each push to build somewhere we can view it without the whole thing going live

@NickleDave
Copy link
Contributor

And this is what the US-RSE site uses for link checking in actions 👇
It can be a little flaky, not sure if you know a better option. Just trying to point to existing actions to make this easier.

https://github.com/USRSE/usrse.github.io/blob/24dd043ab0453896ca49c655461776ee788b00d4/.github/workflows/linting.yaml#L17

    - name: URLs-checker
    
      # Will be updated to 0.0.26
      uses: urlstechie/[email protected]
      with:
        # A comma-separated list of file types to cover in the URL checks
        file_types: .md,.py,.yml

        # Choose whether to include file with no URLs in the prints.
        print_all: false

        # More verbose summary at the end of a run
        verbose: true

        # How many times to retry a failed request (defaults to 1)
        retry_count: 3

        # Google Forms is having enormous timeouts
        timeout: 10

        # Exclude these patterns from the checker
        exclude_patterns: supercomputing.org,https://pace.gatech.edu,https://www.linkedin.com,jobs.colorado.edu,zoom.us,danielskatz.org,usrse.github.io.wiki.git,ornl.gov,jobs.bnl.gov,https://www.rd-alliance.org/,https://uwhires.admin.washington.edu/

        # Exclude these files from the checker
        exclude_files: README.md,SocialNetworks.yml,map.yml,_config.yml,tests/test_,.github/workflows,_posts/newsletters/

@lwasser
Copy link
Member Author

lwasser commented Sep 20, 2022

heya @NickleDave i actually setup an action like this for earthdatascience.org - please check out the original issue for an example.

UPDATE SOMETHING IS NOT RIGHT with THAT LINK>.. let me find it.

@vsoch
Copy link

vsoch commented Sep 20, 2022

Circle CI is for previews. If you don’t plan on having many builds, Netlify (free tier) is amazing, but the free tier is too small for a very busy site.

@lwasser
Copy link
Member Author

lwasser commented Sep 20, 2022

ok i fixed the link. that is really odd!!

@lwasser
Copy link
Member Author

lwasser commented Sep 20, 2022

👋 @vsoch !!! we are definitely interested in netlify - also to get out of the annoying safe mode limitations here

@vsoch
Copy link

vsoch commented Sep 20, 2022

That version of urlchecker is very old. https://github.com/urlstechie/urlchecker-action/releases/tag/0.0.33

For transparency, I maintain this library.

@NickleDave
Copy link
Contributor

NickleDave commented Sep 20, 2022

UPDATE SOMETHING IS NOT RIGHT with THAT LINK>.. let me find it.

Ah whoops I should have asked for clarification about why the link was not actions before dumping in a bunch of other stuff.
Sorry for any confusion.

@Athene-ai feel free to ignore me and work from the Actions that @lwasser linked to now that it's fixed:
https://github.com/earthlab/earthlab.github.io/blob/main/.github/workflows/build-site.yml

sorry 😁 😬

@Athene-ai
Copy link

@NickleDave absolutely do not worry about 😉

@lwasser
Copy link
Member Author

lwasser commented Sep 20, 2022

i second @Athene-ai ... maybe they have a better idea as to how to build our workflow :) thank you @NickleDave for the input!! and thank y'all for the suggestions and guidance and for being here! y'all rock!

@lwasser
Copy link
Member Author

lwasser commented Nov 8, 2022

Ok this has been setup already so closing !!

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
help wanted Extra attention is needed
Projects
Development

No branches or pull requests

4 participants