linemanjs / lineman-angular-template

A Lineman Application Template using AngularJS
251 stars 88 forks source link

Add .travis.yml #15

Closed Foxandxss closed 11 years ago

Foxandxss commented 11 years ago

Since Lineman works good with CI I added a .travis.yml file like Lineman has in its default template.

davemo commented 11 years ago

:+1:

Foxandxss commented 11 years ago

@davemo @searls I will add here the result of my research (About e2e with travis).

First:

seleniumServerJar: '/usr/local/opt/selenium-server-standalone/selenium-server-standalone-2.33.0.jar'

Selenium is installing 2.35.0 atm so that is needed to change.

Leaving that aside. Travis problems:

language: node_js
node_js:
- 0.10
before_script:
- ./node_modules/protractor/bin/install_selenium_standalone
- java -jar selenium/selenium-server-standalone-2.35.0.jar -Dwebdriver.chrome.driver=./selenium/chromedriver &
- sleep 3
script:
- "lineman spec-ci"
- "lineman grunt spec-e2e"

The server will be launch from that path "./selenium/selenium-server...." No problems with that.

The problem is that our e2e config will try to launch a new selenium server from /user/local/opt and use it. In travis we will have the selenium server running beforehand.

What we need is to comment out that line and put this one:

seleniumAddress: 'http://localhost:4444/wd/hub'

With that travis will use the selenium server we ran.

To be honest, in my lineman apps I make those changes because I have a selenium server always up in my machine.

So, with the first line commented out and with this one working, travis will be happy about selenium server, but the other problem is... chrome. I don't see the way to run a chrome in travis, so we need something headless like phantom.

TL;DR; We need spec-e2e-ci with a ci config of spec-e2e.js.

davemo commented 11 years ago

In general the spec-ci task needs some love, I've wanted to be able to pass Testem options in to it like lineman spec-ci -f config/spec-e2e.js, I'll create an issue.

Foxandxss commented 11 years ago

I see it. Ping me if you need more tests / brainstorming / whatever. I want to put some proper e2e in my app :)