W3C home > Mailing lists > Public > spec-prod@w3.org > October to December 2014

ReSpec errors and Continuous Integration

From: Dominique Hazael-Massieux <dom@w3.org>
Date: Wed, 05 Nov 2014 10:37:38 +0100
Message-ID: <1415180258.23385.5.camel@w3.org>
To: spec-prod@w3.org
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
Received on Wednesday, 5 November 2014 09:38:00 UTC

This archive was generated by hypermail 2.4.0 : Friday, 17 January 2020 19:55:20 UTC