Re: ReSpec errors and Continuous Integration

I had a thought about this whole thing.... I bet we could incorporate
automatic linkchecking and pubrules checking as well.  Specrebus is coming
along nicely.  I realize that this isn't necessarily something people
always want, but as a document gets toward publication just knowing what
areas need attention could be a real boon.

On Wednesday, November 5, 2014, Dominique Hazael-Massieux <dom@w3.org>
wrote:

> Hi,
>
> I've modified a bit respec2html.js, the phantomjs script that allows to
> build the HTML output of a respec from the command line:
> https://github.com/w3c/respec/pull/357
>
> These modifications make it usable as a way to "validate" the
> correctness of a ReSpec document: when errors or warnings are emitted
> during the generation of the final HTML output, they can be printed out
> (using the -e and -w command lines parameters).
>
> These changes makes it also possible to use respec2html.js in a
> continuous integration environment where any "build" error triggers an
> alert.
>
> I have in particular started to see how to use this in the context of
> Travis CI (http://travis-ci.org), a popular continuous integration tool
> plugged into GitHub.
>
> To set up Travis CI, you need a configuration file (named .travis.yml)
> to indicate what the "build" process consists of; the
> following .travis.yml does the trick for respec2html.js:
>         language: python
>         install: git clone https://github.com/w3c/respec.git
>         script: phantomjs --ignore-ssl-errors=true --ssl-protocol=tlsv1
>         respec/tools/respec2html.js -e -w
>         respecsourcefiletobechecked.html output.html
>
> (I picked python as the environment language, but in this case, it's not
> really needed)
>
> I have tested it on my fork of the getUserMedia spec, and it worked:
> https://travis-ci.org/dontcallmedom/mediacapture-main/builds/40003971
>
> I'll be looking into integrating this with our main repo for that spec
> and other specs from my groups.
>
> I've also been looking at at applying a similar mechanism for automatic
> WebIDL syntax verification (via the WebIDL checker
> https://github.com/dontcallmedom/webidl-checker/) as you can maybe guess
> from the build output linked above.
>
> Dom
>
>
>
>

-- 
Shane McCarron
Managing Director, Applied Testing and Technology, Inc.

Received on Tuesday, 11 November 2014 13:07:22 UTC