1. Add a Project to CircleCI

Link an existing project in a GitHub repository to CircleCI for continuous integration testing.

There are a several of advantages to running your tests in CircleCI:

Continuous Integration Read the Continuous Integration article on ThroughtWorks for more information about continuous integration practices in software.

1. Build your Project in CircleCI

To add new project to CircleCI, you need to be an administrator for the CircleCI account. Ask your system administrator for access privileges.

1. Click on the upper right hand "Log In" link to sign in to CircleCI at with your GitHub account credentials.

2. On the left-hand side menu, select the "Add Projects" menu option.

3. On the "Add Projects" page, under the first "Your accounts" section, click the "mobify" link.

If you are Mobify partner, select your company name and URL instead.

Chose Your Account

4. On the "Add Projects" page, in the second section, filter or scroll for your project repository.

Choose Your GitHub Repository

5. Click the "Build Project" button beside the repository name.

CircleCI installs dependencies and starts to build.

The side bar loads with all of the branch activities for that project.

The Building Repository

In the side bar under the project name, the Nightwatch.js tests that recently ran on the project are listed. The successful ones have a green checkmark indicator and failed attempts have a red cross.

The test either passes or fails.

6. Scroll to the top heading of the page to see the Nightwatch.js test status displayed.

2. Add the CircleCI Configuration File to your GitHub Repository to Execute Automated Testing

1. Copy this circle.yml configuration file listing for a simple CircleCI Nightwatch.js tests.

        - gem install sass compass:
            timeout: 600
        - npm install:
            timeout: 600
        - chmod 755 ./node_modules/nightwatch-commands/selenium/drivers/chromedriver:
            timeout: 10

        - grunt preview:
            background: true
            timeout: 120
        - sleep 5
        - grunt nightwatch:
            timeout: 600

2. Go to GitHub at

If you are a Mobify partner, sign in to your company GitHub repository.

3. Filter to find your project in the repository.

For example, start to type "merlin" to find the merlins-potions-adaptive repository.

4. Click on your project name to view its code repository in GitHub.

5. At the top of the project branch, near the name of the project, click the "+" link to create a new file at the root level of the project.

Add a New File to the GitHub Repository

6. In the "Name your file..." text box, enter the circle.yml file name.

7. Paste the contents of your clipboard with the simple CircleCI script into the "Edit new file" text field.

8. Scroll to the bottom of the page to commit the new file. Type in any additional descriptions in the provided text fields.

9. Select the "Create a new branch for this commit ... " toggle to create a new branch for the test.

Name your branch with our lower caps and dash-separated name-of-new-branch name convention.

10. Click the "Propose new file" button.

Commit New File in GitHub

11. On the next page, fill out the details of your pull request and click the "Create pull request" button.

12. The next page that appears shows your new "Create circle.yml #PullRequestNumber" pull request.

13. Hover over the indicator beside your commit number to see the status of the CircleCI test. It displays a message similar to "Pending: CircleCI is running your tests."

Test Indicator

14. Click on the colored indicator to see the execution of CircleCI on your project in the CircleCI site.

The test executes with a success message if Nightwatch is correctly configured.

15. Navigate with the "Back" button of your browser to GitHub to check your pull request.

Your test status indicators show red crosses for failed tests and green check marks for successful tests.

The Test Execturion Indicator Marks

Edit in GitHub