Skip to content
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

Makes the necessary setup for Travis CI #530

Merged
merged 2 commits into from
May 7, 2016

Conversation

benjamin-albert
Copy link
Contributor

@benjamin-albert benjamin-albert commented May 7, 2016

As we've discussed on Slack I've:

  1. Added the test task to Gulp and setup Travis CI.
  2. Made npm install run gulp build --prod to avoid issues (like cannot find the file app/public/css/app.css after deploying to heroku #514).

When you enable Travis CI on your repo and someone opens a pull request (or pushes a commit):

  1. A clean npm install (which runs gulp build --prod) is ran.
  2. gulp test is ran, which runs the tests.

I've already enabled Travis CI on my fork, click on the badge for details:
Build Status

@joemccann To enable Travis CI on your repo you should:

  1. Merge this PR (which make all the necessary setup required on our side).
  2. Login to Travis CI with your GitHub account.
  3. Authorize the Travis CI application.
  4. Enable builds on the Dillinger repo.
  5. Push a commit (or open a pull request) and watch it run the build :)

I wanted to add the Travis CI badge to the project's Readme but until we implement the React preview the badge image will be reloaded each time a debounce occurs (the user types).

And since these badges are dynamic (they will change depending on the projects build status) they are not cached so it's not very elegant to watch it flashing as you type.

I can't wait to open a PR for the React preview and the build passing badge :)

I also updated Karma to version 0.13.22 to avoid karma-runner/karma#1782 after successfully running the new test task.

To avoid issues such as joemccann#514 and to allow Travis CI
to run unit test.
This commit also updates karam to 0.13.22 to avoid
karma-runner/karma#1782 (sockets.forEach is not a function)
when running gulp test.
@@ -0,0 +1,5 @@
language: node_js
node_js:
- "5.10.1"
Copy link
Contributor Author

@benjamin-albert benjamin-albert May 7, 2016

Choose a reason for hiding this comment

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

I couldn't get npm to install gulp properly with node version 4.4.3 (I'm guessing it has something to do with an older version of npm).

This shouldn't mater because we don't have any server side tests yet (and the tests are running in PhantomJS anyway).

@joemccann I'll fix this issue when we setup server side tests (which I want to discuss with you on Slack).

@benjamin-albert
Copy link
Contributor Author

benjamin-albert commented May 7, 2016

Once Travis CI is enabled a red X will appear on broken pull requests like #513, and clicking it should lead you to the failed build log.

@joemccann joemccann merged commit 5cb9a55 into joemccann:master May 7, 2016
@joemccann
Copy link
Owner

awesome work

joemccann added a commit that referenced this pull request May 8, 2016
Makes the necessary setup for Travis CI
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.

2 participants