w3c / csvw

Documents produced by the CSV on the Web Working Group
Other
162 stars 57 forks source link

Add Gemfile and travis config to check REC-* #788

Closed gkellogg closed 8 years ago

gkellogg commented 8 years ago

and other documents on checkin.

@iherman, setting up the Travis configuration requires administrative rights, which I lack. Once done, this will run the checks defined in .travis.yml:

  - bundle exec htmlproof ./index.html --check-html
  - bundle exec htmlproof ./publishing-snapshots/REC-csv2json/Overview.html --check-html
  - bundle exec htmlproof ./publishing-snapshots/REC-csv2rdf/Overview.html --check-html
  #- bundle exec htmlproof ./publishing-snapshrts/REC-html-note/Overview.html --check-html
  - bundle exec htmlproof ./publishing-snapshots/REC-metadata/Overview.html --check-html
  #- bundle exec htmlproof ./publishing-snapshrts/REC-ns/Overview.html --check-html
  - bundle exec htmlproof ./publishing-snapshots/REC-syntax/Overview.html --check-html
  - bundle exec htmlproof ./ns/index.html --check-html

It will give a warning on pull requests if the tests don't pass, which they won't until issues are found. It mostly finds link issues, as the referenced docs aren't in place, but also notes what looks like some mistaken HTML in a couple of documents.

To enable, to to http://travis-ci.org, login or create a profile, linking your GitHub account. You'll then see available accounts for which you can turn on checking. When this happens, Travis will look for checkins and run the specified tests and GitHub will show the status of these checks in Pull Requests.

It would probably be better to automate creating snapshots and check the snapshots for consistency with the w3c.github.io/csvw versions of the documents, but I don't see an easy way to automate that right now.

iherman commented 8 years ago

I am not sure about this one, @gkellogg. If my understanding is correct, this will perform a link check on any PR we issue against the repo. Is that correct? If so, the problem I see is that the W3C link checker, understandably, take a long time. If so, then every PR will become a royal pain, even on very small items, and that is really not worth the trouble (after all, we have only one iteration to go).

Is it possible to assign such tests on a specific label or something? I have never used Travis, so I really do not know...

gkellogg commented 8 years ago

It runs separately, and you don't need to wait before merging, but it is useful for showing the general state of repo and publications. Once set up, it's easy to subsequently disable. It can help prevent accidents from creeping in, but will be more useful when the publication snapshots are placed in their final locations.

It also noted some html markup issues I'll look into separately, such as an anchor without href in csv2json that doesn't look intentional.

It looks to me that it would take a couple of minutes per run, but this is quite common for repository checks. Many I manage can take 10 minutes, which might mean a small delay before doing a merge if you want to wait for the results. Generally, I find these things useful. If we have a call this week, we can discuss then.

iherman commented 8 years ago

Ok. I can try to set it up if it is easy to switch it off….

(Again, I have no practice in Travis)

Ivan

On 30 Nov 2015, at 16:15, Gregg Kellogg notifications@github.com wrote:

It runs separately, and you don't need to wait before merging, but it is useful for showing the general state of repo and publications. Once set up, it's easy to subsequently disable. It can help prevent accidents from creeping in, but will be more useful when the publication snapshots are placed in their final locations.

It also noted some html markup issues I'll look into separately, such as an anchor without href in csv2json that doesn't look intentional.

It looks to me that it would take a couple of minutes per run, but this is quite common for repository checks. Many I manage can take 10 minutes, which might mean a small delay before doing a merge if you want to wait for the results. Generally, I find these things useful. If we have a call this week, we can discuss then.

— Reply to this email directly or view it on GitHub https://github.com/w3c/csvw/pull/788#issuecomment-160657584.


Ivan Herman, W3C Digital Publishing Lead Home: http://www.w3.org/People/Ivan/ mobile: +31-641044153 ORCID ID: http://orcid.org/0000-0003-0782-2704