Skip to content

Commit

Permalink
Adding Travis
Browse files Browse the repository at this point in the history
  • Loading branch information
steveklabnik committed Dec 2, 2011
1 parent 0d92134 commit 22a7c5f
Show file tree
Hide file tree
Showing 2 changed files with 14 additions and 0 deletions.
4 changes: 4 additions & 0 deletions .travis.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,4 @@
before_script: "sh -e /etc/init.d/xvfb start && sudo aptitude -y -q install unzip chromium-browser"
script: "bundle exec rake travis"
rvm:
- 1.9.2
10 changes: 10 additions & 0 deletions Rakefile
Original file line number Diff line number Diff line change
Expand Up @@ -9,3 +9,13 @@ task :test do
end
task("tests").execute
end

task :travis do
puts "Grabbing chromedriver..."
mkdir_p "/tmp/bin"
system "cd /tmp/bin && wget http://chromium.googlecode.com/files/chromedriver_linux32_16.0.902.0.zip && unzip chromedriver_linux32_16.0.902.0.zip"

puts "Starting to run tests..."
system("export PATH=/tmp/bin:$PATH && export DISPLAY=:99.0 && bundle exec rake test")
raise "`rake test` failed!" unless $?.exitstatus == 0
end

3 comments on commit 22a7c5f

@milandobrota
Copy link

Choose a reason for hiding this comment

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

Will a browser run through xvfb run JS code?

@steveklabnik
Copy link
Owner Author

Choose a reason for hiding this comment

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

Yes.

@milandobrota
Copy link

Choose a reason for hiding this comment

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

Cool thanks!

Please sign in to comment.