meteor

Basic Codeship Setup for Automated Testing

Setup Codeship

  • Go to Codeship.com and create an account (or login)
  • Create a new project
  • Import your project via Github or Bitbucket
  • On the screen “Configure Your Tests” use these commands:
    • Select “I want to create my own custom commands” from the “Select your technology to prepopulate basic commands” dropdown.

    • Enter the following commands:

        curl -o meteor_install_script.sh https://install.meteor.com/
        chmod +x meteor_install_script.sh
        sed -i "s/type sudo >\/dev\/null 2>&1/\ false /g" meteor_install_script.sh
        ./meteor_install_script.sh
        export PATH=$PATH:~/.meteor/
        meteor --version
        meteor npm install
    • Leave the test commands like this:

      npm test
  • Push a new commit to Github / Bitbucket
  • That’s it

Prepare the Project

  • Write some tests
  • Install dispatch:mocha-phantomjs:
    meteor add dispatch:mocha-phantomjs
  • Add a test-command to your package.json.
    {    
      "name": "awesome meteor package",
      "scripts": {
        "test": "meteor test --driver-package dispatch:mocha-phantomjs --once"
      }
    }
  • Make sure that you can run npm test in your project root.

This modified text is an extract of the original Stack Overflow Documentation created by the contributors and released under CC BY-SA 3.0 This website is not affiliated with Stack Overflow