Skip to content

Checking for broken links with TravisCI #62

Open
@peterjc

Description

@peterjc
Member

See #19 for fixing all the existing broken links.

Once that's done, we should add a link checker to TravisCI to keep appraised of any broken links (due to external site changes) or bad links in incoming pull request.

@JoaoRodrigues suggested following https://www.jacobtomlinson.co.uk/jekyll/2015/02/18/test-you-jekyll-blog-with-travis-ci/ which suggests this for the .travis.yml file:

language: ruby
rvm:
  - 2.1
script:
  - bundle exec jekyll build
  - bundle exec htmlproof ./_site --only-4xx --check-favicon --check-html
env:
  global:
    - NOKOGIRI_USE_SYSTEM_LIBRARIES=true # speeds up installation of html-proofer

Activity

souravsingh

souravsingh commented on Jul 22, 2016

@souravsingh

@peterjc We can make use of linkchecker for checking broken links https://wummel.github.io/linkchecker/

peterjc

peterjc commented on Jul 22, 2016

@peterjc
MemberAuthor

@souravsingh have you tried using linkchecker under TravisCI to check local files which GitHub Pages and Jekyll will generate?

This repository seems to use it, https://github.com/mingwpy/mingwpy.github.io/blob/source/.travis.yml

There's an open issue on the link checker repository about how best to do this (or indeed, if we should do this): wummel/linkchecker#573

souravsingh

souravsingh commented on Aug 21, 2016

@souravsingh

@peterjc Should we go with using linkchecker or using the solution @JoaoRodrigues suggested? I think the latter solution is the best.

peterjc

peterjc commented on Aug 22, 2016

@peterjc
MemberAuthor

@souravsingh You can try either.

I suggest you try installing and running the link checker on your own computer, and if you find any broken links please submit fixes.

Then you'd need to test this works via TravisCI. If you fork Biopython on GitHub, you should be able to turn on TravisCI for your fork. Once you have something working please make a pull request to the main Biopython website repository (which will run TravisCI again via the Biopython account).

souravsingh

souravsingh commented on Aug 22, 2016

@souravsingh

@peterjc I have run the linkchecker on the website. Here is the list of dead links-https://gist.github.com/souravsingh/cfa0a363bfdad416e89dfe807078d99a

peterjc

peterjc commented on Aug 22, 2016

@peterjc
MemberAuthor

@souravsingh see #19 for dead links (and #7 for the releases).

Note there are some false positives in the linkchecker output, e.g. ConnectionError examples probably need a retry. Perhaps there are some linkchecker options you can use here, as otherwise this will not be useful for TravisCI testing.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

      Development

      No branches or pull requests

        Participants

        @peterjc@souravsingh

        Issue actions

          Checking for broken links with TravisCI · Issue #62 · biopython/biopython.github.io