-
Notifications
You must be signed in to change notification settings - Fork 72
Continuous Integration
In deployed applications, one method of releasing updates is continuous integration — new changes are checked in several times a day, with automated test suites to verify the build. CI services can hook into GitHub and enable features like running test suites for every PR, grading code quality, automatically deploying the most recent updates to the live app, etc.
There are many good CI services out there. Some of the most popular include:
This Gist will walk you through setting up the latter, which is free for open source projects and does not require adding any files to your project.
For user-owned projects, the following steps will have to be performed by the user whose account hosts the repo. For organization-owned projects, the following steps can be performed by any admin-level user within the organization.
- Visit https://www.codeship.io/ and sign up with your GitHub account.
- Authorize Codeship to read your GitHub account info (email, repos).
- Fill out the required sections of their questionnaire (experience level, number of engineers).
- Select the GitHub icon to read a GitHub project.
- Enter the clone URL of a GitHub project.
Under Setup Commands, replace the sample code with the following:
psql -c 'create database fsg;'
psql -c 'create database "testing-fsg";'
nvm use v6
npm install -g gulp
npm install
Under Test Commands, replace the sample code with the following:
gulp testServerJS
gulp testBrowserJS
Finally, save your changes.
Codeship automatically added a web hook to the repo when you connected it. The next time you push a commit (or new branch) or make a PR, it will kick off a test for you. Monitor the build and make sure it goes through; ask an instructor for help if there are any errors.
That's it! From now on you'll get automated online feedback in your PRs notifying you if tests fail. Naturally, this is more helpful if you've written thorough tests.