Skip to content

.travis.yml: Add gulp validation #519

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

Merged
merged 7 commits into from
Dec 18, 2017
Merged

Conversation

wking
Copy link
Contributor

@wking wking commented Dec 16, 2017

Details on the individual pivots in the commit messages, but this pull requests gets automatic schema validation to avoid issues like #517 (which it fixes).

The tests aren't as extensive as those in #513. I think we want that sort of XML-template vs. known good/bad sample testing soon, but filling in gulp-based tests seems like something we want as well, and it's easier to implement.

Fixes #518.

Avoiding:

  $ gulp
  done
  [20:20:25] Using gulpfile .../license-list-XML/gulpfile.js
  [20:20:25] Task 'default' is not in your gulpfile
  [20:20:25] Please check the documentation for proper gulpfile formatting
  $ echo $?
  1
These were committed in 378fe01 (Update all source files to the new
XML format and add in the tools from the schemadev branch,
2017-10-17), but they are redundant.  The validateall call is
redundant when you run the 'validate' task (which has its own
validateall call).  And the console.log('done') prints done, when it
would be better to have validateall print a summary.
The output looks like:

  [20:28:32] validation complete 362 passed, 1 failed
@wking
Copy link
Contributor Author

wking commented Dec 16, 2017

And I've updated the schema with use="required" to catch issues like #518, and also added a commit to fix #518.

Copy link
Member

@goneall goneall left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Overall, changes look good.

Enabling the gulp testing in travis sounds like a good idea - more efficient then invoking the Java application. Still would like to merge #513 into the same travis-ci script. Will rebase after this merge.

@wking wking force-pushed the travis-gulp-tests branch from 4cb164a to 3ddcfc9 Compare December 17, 2017 22:42
Docs for 'npm test' [1]:

> This runs a package's "test" script, if one was provided.

This is the default way to run npm tests [2], so this commit adds
support for it.

[1]: https://docs.npmjs.com/cli/test
[2]: https://docs.travis-ci.com/user/languages/javascript-with-nodejs/#Default-Build-Script
Avoid:

  $ npm test
  ...
  [21:00:01] File ./src/ISC.xml  at line 9 Element '{http://www.spdx.org/license}alt': The attribute 'name' is required but missing.
  ...
@wking
Copy link
Contributor Author

wking commented Dec 17, 2017

I've dropped the CDLA-Sharing-1.0 patch with 4cb164a3ddcfc9, now that the <item> approach is in #521.

@goneall
Copy link
Member

goneall commented Dec 18, 2017

I'm going to merge this so that I can run the license tests again. I'll submit a separate PR for issue #520

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

Missing required name attribute for ISC
2 participants