Skip to content

Instantly share code, notes, and snippets.

@wang-zhijun
Last active October 26, 2016 00:41
Show Gist options
  • Save wang-zhijun/40c184c75f0e1ff3ac6342b9f076e32c to your computer and use it in GitHub Desktop.
Save wang-zhijun/40c184c75f0e1ff3ac6342b9f076e32c to your computer and use it in GitHub Desktop.
CircleCI

The circle.yml file is made up of six primary sections. Each section represents a phase of running your tests:

  • machine:

  • adjusting the VM to your preferences and requirements

  • checkout:

  • checking out and cloning your git repo

  • dependencies:

  • setting up your project’s language-specific dependencies

  • database:

  • preparing the databases for your tests

  • test:

  • running your tests

  • deployment:

  • deploying your code to your web servers

a non-zero exit code during the setup sections (machine:, checkout:, dependencies:, database:) will cause the build to fail early.

You can modify which—and when—commands are run by adding override, pre and/or post to adjust CircleCI’s inferred commands. Here’s how it works:

pre: commands run before CircleCI’s inferred commands

override: commands run instead of CircleCI’s inferred commands

post: commands run after CircleCI’s inferred commands

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment