Skip to content

Instantly share code, notes, and snippets.

@triblondon
Last active January 4, 2016 22:09
Show Gist options
  • Save triblondon/8686330 to your computer and use it in GitHub Desktop.
Save triblondon/8686330 to your computer and use it in GitHub Desktop.
Sample Travis test to ensure that Origami-compliant modules will build successfully
script:
- "test/travis.rb"
language: ruby
before_install:
- gem install sass
- npm install -g bower
- npm install -g grunt-cli
- npm install
- bower install
#!/usr/bin/env ruby
# Create build output directory
Dir.mkdir('buildcache')
# Perform the build
result = `grunt`
# Check the exit code was 0 (i.e. no errors)
raise result unless $?.to_i == 0
# Check the output of the build
raise "When compiled the module should output some CSS" unless File.exists?('buildcache/bundle.css');
raise "When compiled the module should output some JavaScript" unless File.exists?('buildcache/bundle.js');
puts "Build complete"
@matthew-andrews
Copy link

Note to self: I should rewrite travis.rb in Node to make it more accessible...

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